Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 297
stackoverflow Avatar asked Sep 14 '18 07:09

stackoverflow


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

like image 137
Heehaaw Avatar answered Sep 30 '22 16:09

Heehaaw