Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular and VS Code disable automatic reload/refresh

when I am running my Angular app in the CLI with "ng serve", on every tiny change in the code, my app gets reloaded / refreshed. How can I stop that behaviour? I know I have seen the command ng serve --live-reload false, but apparently, I have to reload everything then in browser by hand.

Weirdly, on my other desktop PC, not my laptop, I can just reload everything by default in VSCode by pressing CTRL+S, otherwise, no changes or reloads are done during changing the code otherwise. I would like to have this behaviour by default on my laptop also... How can I do that?

like image 487
MMM Avatar asked Sep 07 '18 17:09

MMM


People also ask

How to stop auto refresh in Angular?

with the command line, you can use --live-reload=false .

Does angular have hot reload?

ng-hot-reload is a tool focused on making UI development more pleasant with AngularJS.


1 Answers

Turn of the autoSave feature. This feature automatically saves your files on any change which cause ng serve to reload the files.

To Change:

File > Preferences > Settings > Search autoSave > select off

User Settings after change:

"files.autoSave": "off",
like image 96
Teddy Sterne Avatar answered Sep 21 '22 07:09

Teddy Sterne