Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular cli - how to disable auto reload when ng serve

When serving my app with the Angular cli, how do I disable auto-reload?

ng --help mentions the --live-reload option, but I can't make it work.

ng serve --live-reload=false or ng serve --live-reload false do not work

EDIT : it seems to be a bug https://github.com/angular/angular-cli/issues/1755

like image 274
maxbellec Avatar asked Sep 19 '16 06:09

maxbellec


People also ask

What happens when Ng serve runs?

ng serve is a great command to use when developing your application locally. It starts up a local development server, which will serve your application while you are developing it. It is not meant to be used for a production environment.

What is WDS Live reloading enabled?

Live Reload is a new feature in Web Connection that can detect when you make changes to any of these types of files: Static HTML files. Static CSS and JavaScript Files. Web Connection Scripts and Templates. FoxPro Code in your Web Connection Server.

What is angular live reload?

Angular (and really any of the major JavaScript UI frameworks that integrate with the WebPack Dev Server) provides a built-in Live Reload Web server that makes it quick and easy to see UI changes updated in the browser as soon as you make a change to your code, HTML or CSS content.


1 Answers

Just do ng serve --live-reload false or ng serve --no-live-reload

It used to not work, this PR solved it.

like image 89
maxbellec Avatar answered Sep 29 '22 18:09

maxbellec