Angular2 cannot watch when using VSCode

走远了吗. 提交于 2020-01-06 15:20:51

问题


I am writing an Angular2 app and use angular-cli with the command ng serve to serve the app on localhost. This builds the app and serves it and also watches the code for changes.

This works fine and when I make any changes to the code and save, angular-cli detects the changes and rebuilds the code and refreshes the browser.

This works fine in about any editor I use except for VSCode. When making changes to the code and saving the code in VSCode, it saves the code, however, angular-cli does not detect the changes. I have to stop angular-cli from watching and manually do a rebuild.

How can I fix this ?


回答1:


I am working on angular 2 and VSCode for last 6 months and using angular-cli. but it works fine for me, may be you have some extenstions installed in VSCode which is causing this issue



来源:https://stackoverflow.com/questions/42360726/angular2-cannot-watch-when-using-vscode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!