angular 2 CLI实时重新加载不起作用

编程入门 行业动态 更新时间:2024-10-09 04:19:27
本文介绍了angular 2 CLI实时重新加载不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在通过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实时重新加载不起作用

本文发布于:2023-11-28 06:31:52,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1641304.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:实时   不起作用   加载   angular   CLI

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!