NG Live Development服务器未检测到ts文件更改 [英] ts file change not detected by NG Live Development server
本文介绍了NG Live Development服务器未检测到ts文件更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
只需使用Angular CLI即可.
Just playing with Angular CLI.
这是我所做的:
- npm install -g angular-cli
- ng新的PROJECT_NAME
- cd PROJECT_NAME
- ng服务
- 在浏览器中通过 http://localhost:4200/来访问页面
- 更改app.component.ts文件,在浏览器中保持不变
- 更改app.component.html文件,新更改会自动反映在浏览器中
未检测到我在ts文件中的更改是什么?
What is that my change in ts file not detected?
推荐答案
您应使用以下命令安装angular cli:
You should install angular cli using:
npm install -g @ angular/cli
而不是:
npm install -g angular-cli
确保您使用的是最新版本,否则请使用
Make sure you're using the latest version and if not, update your Angular CLI to the latest version.
如果仍然存在更改检测问题,请使用以下命令为我解决此问题(在Ubuntu上):
If you have still change detection issue, using the following solved the issue for me (on Ubuntu):
echo 65536 |sudo tee -a/proc/sys/fs/inotify/max_user_watches
这篇关于NG Live Development服务器未检测到ts文件更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文