我正在通过angular-cli版本1.0.0-beta.28.3创建angular 2应用程序。
I am creating angular 2 application through "angular-cli" version "1.0.0-beta.28.3".
当我使用命令npm start时或ng serve,该应用程序的工作价格为 http:// localhost:4200
When I am using commands "npm start" or "ng serve", the app is working at localhost:4200
但是,当更改脚本文件或CSS类型的某些代码时,浏览器的实时刷新不会发生。这有什么不对?谢谢!
But, when changing some code for type Script file or CSS, the live refresh for browser is not happening. What's wrong here? Thanks!
推荐答案尝试删除 node_modules 文件夹并运行 npm install 再次。这应该升级坏的npm依赖。
Try deleting your node_modules folder and running npm install again. This should upgrade a bad npm dependency.
顺便说一下,你可能还想升级到Angular CLI beta 29,因为beta 28.3一般有一些问题。如果您这样做,请注意包名称已在beta.29中从 angular-cli 更改为 @ angular / cli 。
By the way, you might also want to upgrade to Angular CLI beta 29 as beta 28.3 has a few issues in general. If you do so, note that the package name has changed in beta.29 from angular-cli to @angular/cli.
更多推荐
angular 2 CLI实时重新加载不起作用
发布评论