Jochen Shi
Jochen Shi

Reputation: 573

angular-cli ng serve --- how can i stop its regular refresh

After running ng serve,the browser will regularly refresh and the page will be reloaded.How can I stop it,so that I can debug.I see that it is the result of 'Websocket',so what configuration can i make to stop this regularly refresh.

Upvotes: 4

Views: 7872

Answers (2)

philipooo
philipooo

Reputation: 1049

You can use ng serve --live-reload=false

See here for more options you can provide to the command:

https://angular.dev/cli/serve

Upvotes: 4

Yoav Schniederman
Yoav Schniederman

Reputation: 5391

you can add at your package.json at script new command :

 "ng notreload" : "ng serve --live-reload=false"

and then run ng notreload at your cmd.

Upvotes: 0

Related Questions