5

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.

stackoverflow
  • 1,303
  • 2
  • 21
  • 36

2 Answers2

3

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 :-)

Heehaaw
  • 2,677
  • 17
  • 27
3

just do ng serve --live-reload false

Update Your CLI version first to the latest one.

Satish Deokar
  • 201
  • 1
  • 9