我是Ionic的新手,我在一本书中开始了教程 - “专家用Ionic 2构建移动应用程序”。
据我所知,serve命令应该自动检测我在typescript / html源代码中所做的任何更改,并将它们反映到我的浏览器中(在“构建”弹出窗口之后)。
在进行更改时,大多数情况下,它们根本就不会在浏览器中显示。
刷新Chrome也无济于事。
例如,完全注释掉.html文件,只显示“建筑物”,ionic-serve cmd窗口显示构建完成,但浏览器的功能保持不变,显然应该只显示一个空白页面
这是packag.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": "4.0.0",
"@angular/compiler": "4.0.0",
"@angular/compiler-cli": "4.0.0",
"@angular/core": "4.0.0",
"@angular/forms": "4.0.0",
"@angular/http": "4.0.0",
"@angular/platform-browser": "4.0.0",
"@angular/platform-browser-dynamic": "4.0.0",
"@ionic-native/core": "3.4.2",
"@ionic-native/splash-screen": "3.4.2",
"@ionic-native/status-bar": "3.4.2",
"@ionic/storage": "2.0.1",
"ionic-angular": "3.0.1",
"ionicons": "3.0.0",
"rxjs": "5.1.1",
"sw-toolbox": "3.4.0",
"zone.js": "^0.8.4"
},
"devDependencies": {
"@ionic/app-scripts": "1.3.0",
"typescript": "~2.2.1"
},
"cordovaPlugins": [
"cordova-plugin-whitelist",
"cordova-plugin-console",
"cordova-plugin-statusbar",
"cordova-plugin-device",
"cordova-plugin-splashscreen",
"ionic-plugin-keyboard"
],
"cordovaPlatforms": [],
"description": "quicklists: An Ionic project"
}
离子2.2.2。 Windows 10。 这在Firefox和Crome都会发生。
非常感谢一种开发方式,因为无响应的环境会让任何事情变得不可能。
由于