Webstorm IDE and AngularJS angular.module unresolved method

I am using the Webstorm IDE for an AngularJS project.

I added AngularJS to librairies and autocompletion etc. works great.

However, the Webstorm IDE does not find the angular.module () function, which is pretty central. I tried everything (reinstallation, etc.), but it still does not work.

Any ideas what this could be?

+6
source share
3 answers

So far, no progress has been made regarding the WebStorm IDS identifier mentioned above, @ AllYouCanEat86, so I'm not sure if it should be fixed without adding libraries to WebStorm. After I followed the recommendations in this answer , my problem was resolved and no longer received a warning in WebStorm.

In short, go to File > Settings > Languages & Frameworks > JavaScript > Libraries and load angular (usually called angularjs ) from the community stubs. It appears in the list as angularjs-DefinitelyTyped after loading it.

+13
source

I have no reputation to respond to the comment, but the @Precastic solution worked for me using Webstorm 9. Note that the library name is "angular", not "angularjs".

To be clear, this solution was:

In short, go to File > Settings > Languages & Frameworks > JavaScript > Libraries and download angular from the community stubs. It appears in the list as angular-DefinitelyTyped after loading it.

+2
source

I had the same problem and the only solution was to enable AngularJS using the CDN as described on the Jetbrains blog .

You include the script tag as follows:

 <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.6/angular.min.js"></script> 

And follow the instructions below:

If you prefer to use CDN, place the cursor over the highlight library name, press Alt + Enter and Download Library. This will create a local library in the WebStorms cache (and not in your project), so WebStorm can access methods, directives, etc. AngularJS for autocomplete and documentation search.

0
source

All Articles