biofractal
biofractal

Reputation: 19133

How do I enable Webstorm intellisense for AngularJS when writing CoffeeScript

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.

enter image description here

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

Thanks

Upvotes: 28

Views: 29698

Answers (3)

Valery
Valery

Reputation: 31

In WebStorm v.11

  • go to "Settings" -> "Plugins" -> "Browse repositories".
  • Search and install "Angular Templates".
  • Profit

    Settings screenshot

Upvotes: 3

Blake
Blake

Reputation: 151

With webstorm 10 you are going to go to the preferences window and from there select Languages & Frameworks > JavaScript > Libraries. Then click the download button, select TypeScript community stubs from the dropdown at the top of the list, find angular and click download and install.

If you are using jshint be sure to go to the jshint settings find the Predefined option and add angular:true to suppress warnings.

Upvotes: 13

biofractal
biofractal

Reputation: 19133

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

Managing Javascript Libraries

Here is the relevant help section: Configuring JavaScript Libraries

Upvotes: 48

Related Questions