Angular CLI and auto update

I am working with Angular CLI and when I run "ng serve" the project should update automatically. However, sometimes this is not ideal. Sometimes changes are not automatically updated and sometimes they do. When the changes are not updated I have to rerun "ng serve" which is time consuming.

Is there any way you can find out when changes are automatically updated and when not? Also, if I see that I need to re-run "ng serve", is there a faster way to update the project?

+3


source to share


4 answers


I had the same problem, Angular CLI AutoCompile didn't work, I used this command which solved the problem

echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

      



This might help you :)

+3


source


Which CLI version are you using? One of the beta releases had an error when it did not include devDependency when setting up your project (@ngtools/webpack)

. This caused an issue where the Typescript compiler was not picking up the changes in your code and the update was not called as a result.



I'm sure the problem has been resolved, but depending on when you created your project, you may have an invalid one package.json

. My advice is to update the CLI according to their instructions, generate a new dummy project and compare the existing project configuration with your own and update as needed.

+1


source


You can open your browser developer tool> select the Network tab> select the "Disable cache" checkbook

0


source


Try

ng serve --poll=1000

      

From: https://github.com/angular/angular-cli/issues/1610

-1


source







All Articles