如何在编写CoffeeScript时为AngularJS启用Webstorm intellisense [英] How do I enable Webstorm intellisense for AngularJS when writing CoffeeScript

查看:186
本文介绍了如何在编写CoffeeScript时为AngularJS启用Webstorm intellisense的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我设置了Webstorm来识别和编译我的coffeescript文件。



我已经安装了AngularJS插件,并且可以成功地将我的控制器等写入简单的旧javascript。



当我尝试在CoffeeScript中编写我的角度相关代码时,我没有得到任何IDE支持:代码完成,intellisense等。



作为一个迹象,一切都不好, angular 变量本身不被识别,如下图所示。



>



问题:如何在CoffeeScript文件中启用对AngularJS的支持?



感谢

未解决的变量或类型angular ,您需要确保angular javascript库已经启用(见下图)。



您通过WebStorm设置执行此操作:


文件 - >设置 - > Javascript - >图书馆




以下是相关帮助部分:配置JavaScript库


I have setup Webstorm to recognise and compile my coffeescript files.

I have installed the AngularJS plugin and can successfully write my controllers etc in plain old javascript.

When I try to write my angular related code in CoffeeScript however I do not get any IDE support: code-completion, intellisense etc.

As a sign that all is not well, the angular variable itself is not recognised, as shown in the image below.

Question: How do I enable support for AngularJS in CoffeeScript files?

Thanks

解决方案

To fix the specific problem Unresolved variable or type angular you need to make sure the angular javascript libraries have been Enabled (see image below).

You do this via the WebStorm settings:

File -> Settings -> Javascript -> Libraries

Here is the relevant help section: Configuring JavaScript Libraries

这篇关于如何在编写CoffeeScript时为AngularJS启用Webstorm intellisense的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆