角度爬升livereload不起作用 [英] Angular-cli ng serve livereload not working
问题描述
我已经使用Ng-cli创建了一个示例项目,然后在源文件夹中运行ng serve,该项目在浏览器中正确加载,但是livereload无法正常工作.
I have created a sample project wiht Ng-cli, then i run ng serve in the source folder, the project loads correctly in the browser but livereload not working.
npm -v:3.10.9
npm -v : 3.10.9
ng -v: 角度cli:1.0.0-beta.19-3 节点:4.4.3 操作系统:win32 x64
ng -v: angular-cli: 1.0.0-beta.19-3 node: 4.4.3 os: win32 x64
已经在互联网上搜索了很多信息,但没有任何解决方法.
Already searched a lot information on internet, and nothing solved the issue.
推荐答案
我在Ubuntu 16.04和angular CLI 1.0.0上遇到了同样的问题.
I faced with the same problem on Ubuntu 16.04 and angular CLI 1.0.0.
该问题与Linux上的Inotify Watches Limit有关. 为了解决此问题,我将手表的限制增加到512K. 运行这些命令.
The problem was related with Inotify Watches Limit on Linux. To solve the issue, I increased the watches limit to 512K. Run these commands.
sudo sysctl fs.inotify.max_user_watches=524288
sudo sysctl -p --system
此后,我重新启动了IDE,然后,更改检测开始起作用.
After that, I restarted my IDE, and after that, the change detection started to work.
这篇关于角度爬升livereload不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!