Ionic2代码更改不会反映在实时应用程序中

时间:2017-02-27 07:27:18

标签: ionic2

我使用Ionic CLI设置了一个新的Ionic2项目。我用ionic serve命令浏览网站。每当我对html模板进行更改时,我都会看到linting和构建过程启动,但html或typescript更改不会反映在浏览器中。我尝试了几个方面,比如清除浏览器缓存,使用Chrome Incognito,甚至杀死离子会话,并重新发出ionic serve命令。几个小时后,我看到代码更改反映在浏览器中。这非常令人沮丧...请建议一个解决方法。我在Windows 10,节点版本6.9.4,离子版本2.2.1

Package.json是:

{
  "name": "ionic-hello-world",
  "author": "Ionic Framework",
  "homepage": "http://ionicframework.com/",
  "private": true,
  "scripts": {
    "clean": "ionic-app-scripts clean",
    "build": "ionic-app-scripts build",
    "ionic:build": "ionic-app-scripts build",
    "ionic:serve": "ionic-app-scripts serve"
  },
  "dependencies": {
    "@angular/common": "2.2.1",
    "@angular/compiler": "2.2.1",
    "@angular/compiler-cli": "2.2.1",
    "@angular/core": "2.2.1",
    "@angular/forms": "2.2.1",
    "@angular/http": "2.2.1",
    "@angular/platform-browser": "2.2.1",
    "@angular/platform-browser-dynamic": "2.2.1",
    "@angular/platform-server": "2.2.1",
    "@ionic/storage": "1.1.7",
    "angularfire2": "^2.0.0-beta.7",
    "firebase": "^3.6.9",
    "ionic-angular": "2.0.1",
    "ionic-native": "2.4.1",
    "ionicons": "3.0.0",
    "rxjs": "5.0.0-beta.12",
    "sw-toolbox": "3.4.0",
    "zone.js": "0.6.26"
  },
  "devDependencies": {
    "@ionic/app-scripts": "^1.0.1",
    "@types/request": "0.0.39",
    "typescript": "2.0.9"
  },
  "cordovaPlugins": [
    "cordova-plugin-whitelist",
    "cordova-plugin-statusbar",
    "cordova-plugin-console",
    "cordova-plugin-device",
    "cordova-plugin-splashscreen",
    "ionic-plugin-keyboard"
  ],
  "cordovaPlatforms": [],
  "description": "webapp: An Ionic project"
}

0 个答案:

没有答案