Showing posts with label how-to. Show all posts
Showing posts with label how-to. Show all posts

Friday, June 15, 2018

How to make ng serve listen other than localhost

Actually, your angular app is running in:

http://localhost:4200/

Now, you can make your angular app run in:

http://172.21.19.19:8080/

It is simply like this:

ng serve --port 8080 --host 0.0.0.0 --disableHostCheck true

That's all!

Sunday, June 10, 2018

How to convert .angular-cli.json to angular.json (Angular 6 Migration)

Error: Local workspace file ('angular.json') could not be found.

Well, after running the following commands for migrating an angular app 5 to angular 6, I realized that the angular-cli.json hadn't been converted as you can see in the screenshot bellow:

npm install -g @angular/cli
npm install @angular/cli
ng update @angular/cli
ng update @angular/core
ng update @angular/material (I didn't execute this because I am not using Angular Material)




So, executing this command, I fixed this error:

ng update @angular/cli --from=1.7.4 --migrate-only


That's it! Now, you can go ahead with *ng serve*
Happy Coding!

Monday, April 23, 2018

How to upgrade Git on Windows

1. Go to https://git-scm.com/download/win and download the .exe program



2. Execute it and follow the wizard (you do not need to uninstall your previous version of git to upgraded it to the latest)
3. That's it!