Top community members
All Wiki Articles Create Wiki Article

Welcome to Dirask IT community! ❤ 💻
We are community of people that helps each other.

If you are beginner in IT field, you are more then welcome to ask questions, it will help you to learn faster. We are here to help you.

We are always beginner in something, we just need to remember it along the way.

there are no wrong questions - Ask Question

Angular 7 - disable browser auto reloading

0 contributions
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


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": {
  ....
  ....
  }
  ....
  ....
}

Context:
https://github.com/angular/angular-cli/issues/1755
https://github.com/angular/angular-cli/issues/9742

0 contributions

Checkout latest Findings & News:

Checkout latest questions:

Checkout latest wiki articles:

Hey 👋
Would you like to know what we do?
  • Dirask is IT community, where we share coding knowledge and help each other to solve coding problems.
  • We welcome everyone,
    no matter what the experience,
    no matter how basic the question is,
    this community will help you.
Read more