2

I have tried many online solution but none of them worked. My issue is that when I change anything in the file, browser is not reloading the page. Below are the configs of my project

Angular: 4.3.1
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router, tsc-wrapped

@angular/cli: 1.6.3
@angular-devkit/build-optimizer: 0.0.36
@angular-devkit/core: 0.0.22
@angular-devkit/schematics: 0.0.42
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.9.3
@schematics/angular: 0.1.11
@schematics/schematics: 0.0.11
typescript: 2.4.2
webpack: 3.10.0

Here is my Package.json file

{
"name": "start-ng",
"version": "1.1.1",
"license": "MIT",
"scripts": {
 "ng": "ng",
 "start": "ng serve",
 "build": "ng build",
 "test": "ng test",
 "lint": "ng lint",
 "e2e": "ng e2e"
},
"private": true,
"dependencies": {
  "@agm/core": "1.0.0-beta.0",
  "@angular/animations": "4.4.6",
  "@angular/common": "4.4.6",
  "@angular/compiler": "4.4.6",
  "@angular/core": "4.4.6",
  "@angular/forms": "4.4.6",
  "@angular/http": "4.4.6",
  "@angular/platform-browser": "4.4.6",
  "@angular/platform-browser-dynamic": "4.4.6",
  "@angular/router": "4.4.6",
  "@ng-bootstrap/ng-bootstrap": "1.0.0-alpha.28",
  "@ngtools/webpack": "^1.9.3",
  "@swimlane/ngx-charts": "6.0.0",
  "@swimlane/ngx-datatable": "9.3.1",
  "angular-2-dropdown-multiselect": "1.5.3",
  "angular-calendar": "0.19.0",
  "angular-in-memory-web-api": "0.3.2",
  "angular-resizable-element": "^1.1.1",
  "bootstrap": "4.0.0-alpha.6",
  "classlist.js": "1.1.20150312",
  "core-js": "2.4.1",
  "d3": "4.10.0",
  "date-fns": "1.28.5",
  "enhanced-resolve": "3.3.0",
  "flag-icon-css": "2.8.0",
  "font-awesome": "4.7.0",
  "intl": "1.2.5",
  "jquery": "3.2.1",
  "leaflet-map": "0.2.1",
  "ng2-ckeditor": "1.1.9",
  "ng2-completer": "1.6.0",
  "ng2-dragula": "1.5.0",
  "ng2-select": "^2.0.0",
  "ng2-smart-table": "1.2.1",
  "ng2-validation": "4.2.0",
  "ngx-pagination": "3.0.1",
  "ngx-perfect-scrollbar": "4.5.2",
  "ngx-toastr": "^5.2.4",
  "tether": "1.4.0",
  "web-animations-js": "2.3.1",
  "widgster": "0.0.3",
  "zone.js": "0.8.14"
},
"devDependencies": {
  "@angular/cli": "1.6.3",
  "@angular/compiler-cli": "4.4.6",
  "@angular/language-service": "4.4.6",
  "@types/jasmine": "2.5.53",
  "@types/node": "8.0.16",
  "codelyzer": "3.1.2",
  "file-loader": "^1.1.6",
  "jasmine-core": "2.6.4",
  "jasmine-spec-reporter": "4.1.1",
  "karma": "1.7.0",
  "karma-chrome-launcher": "2.2.0",
  "karma-cli": "1.0.1",
  "karma-coverage-istanbul-reporter": "1.3.0",
  "karma-jasmine": "1.1.0",
  "karma-jasmine-html-reporter": "0.2.2",
  "protractor": "5.1.2",
  "rxjs": "^5.5.6",
  "ts-node": "3.3.0",
  "tslib": "1.7.1",
  "tslint": "5.5.0",
  "typescript": "^2.3.4"
 }
}

I have done with most of the solutions but still didn't get anything helpful yet. It was working fine till yesterday but today when I started it, its not reloading on any changing, in fact I made changes only in html and scss files only.

4

1 回答 1

7

我通过添加一个带有 serve 的命令来解决这个问题。

ng serve --poll=2000
于 2018-01-11T07:31:12.750 回答