如何写CoffeeScript的时候我能Webstorm智能感知AngularJS [英] How do I enable Webstorm intellisense for AngularJS when writing CoffeeScript

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

问题描述

我已经设置Webstorm识别和编译我的CoffeeScript文件。

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

我已经安装了AngularJS插件,可以成功地写我的控制器等在普通的旧的JavaScript。

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

当我尝试写在CoffeeScript中我的角度相关code,但是我没有得到任何的IDE支持:code-完成,智能感知等。

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.

:我怎么启用AngularJS支持的CoffeeScript文件

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

感谢

推荐答案

要解决的具体问题未解决的变量或类型的角您需要确保角度javascript库有一直已启用(见下图)。

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).

您通过WebStorm设置做到这一点:

You do this via the WebStorm settings:

文件 - >设置 - >使用Javascript - >库

File -> Settings -> Javascript -> Libraries

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

Here is the relevant help section: Configuring JavaScript Libraries

这篇关于如何写CoffeeScript的时候我能Webstorm智能感知AngularJS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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