EN
Angular 7 - disable browser auto reloading
14
points
Problem:
How to disable auto reloading in angular 7?
I want to stop auto reloading in angular 7 app.
When I make even small change in project entire web page reloads.
Is there a way to disable it?
Solution:
1. Find package.json
2. Change 1 line:
BEFORE:
"start": "ng serve",
AFTER:
"start": "ng serve --live-reload false",
3. Restart server
4. And it works
NOTE: package.json file looks like this:
BEFORE:
{
"name": "ng-gmaps",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve", <--------- THIS LINE BEFORE
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
....
....
}
....
....
}
AFTER:
{
"name": "ng-gmaps",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve --live-reload false", <--------- THIS LINE AFTER
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
....
....
}
....
....
}