Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I prevent auto reload page when ng serve for one time?

Sometimes I make few css sketch updates in Chrome, see that it is exactly the updates I need. Then I add them to css file. And at this step, I have to save the css file. But after saving I lose my sketch updates in Chrome. It's ok if I make all changes in css file correctly. But in case I did some misprint or forget to copy some css style I have to check what did I wrong because I can't check with sketch updates in Chrome.

How do I prevent auto reload page when ng serve for one time?

like image 945
mr_blond Avatar asked Jan 27 '23 08:01

mr_blond


1 Answers

Start your dev server with:

ng serve --live-reload false

Docs here: https://github.com/angular/angular-cli/wiki/serve

If that doesn't work then do:

ng serve --live-reload=false

You could run two dev servers at same time as follows:

ng serve // with live reload on port 4200

ng serve --live-reload=false --port=4300 // without live reload on port 4300

These could run concurrently.

like image 83
danday74 Avatar answered Jan 29 '23 21:01

danday74