Disconnect hot reloading for a particular tab, through devtools console, for angular apps

Viewed 337

Is there a way to disconnect the web sockets from hot reloading my angular app, for a particular browser tab by using devtools console window?

I would need to keep the app at a particular state while I have another instance open in another tab that will have enabled hot reloading.

2 Answers

Just run your app twice - one through the dev server with websocket reloading (your ng serve) and the second one without the dev server.

ng build 
&& cd ./dist 
&& npx live-server --entry-file index.html --port <SOMETHING OTHER THAN 4200>

or

ng serve --live-reload false --port <SOMETHING OTHER THAN 4200>

Now you can access your static app at localhost:<SOMETHING OTHER THAN 4200>.

Hope this helps a little :-)

just do ng serve --live-reload false

Update Your CLI version first to the latest one.

Related