mr_blond
mr_blond

Reputation: 1730

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?

Upvotes: 4

Views: 3508

Answers (1)

danday74
danday74

Reputation: 56966

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.

Upvotes: 9

Related Questions