I am using Webstorm IDE for an AngularJS project.
I have added AngularJS to the librairies and autopletion etc. works just fine.
However, Webstorm IDE does not find the function angular.module() which is quite central. I have tried everything (reinstalling, etc.) but it still does not seem to work.
Any ideas what it could be?
I am using Webstorm IDE for an AngularJS project.
I have added AngularJS to the librairies and autopletion etc. works just fine.
However, Webstorm IDE does not find the function angular.module() which is quite central. I have tried everything (reinstalling, etc.) but it still does not seem to work.
Any ideas what it could be?
Share Improve this question asked Nov 4, 2015 at 16:54 user3370602user3370602 2- 1 Apparently it's a bug in WebStorm11 IDE Link to ticket – user3370602 Commented Nov 9, 2015 at 16:11
- Totally ridiculous that JetBrains hasn't resolved this. It's like if the someobj.prototype wasn't recognized. Jeez. – MaxRocket Commented Feb 1, 2016 at 21:18
3 Answers
Reset to default 15To date there has been no progress on the WebStorm IDS ticket referenced above by @AllYouCanEat86 so I am not sure if it should be fixed without adding libraries to WebStorm. Once I followed the advice given in this answer my issue was resolved and no longer got the warning in WebStorm.
In short go to File > Settings > Languages & Frameworks > JavaScript > Libraries
and download angular
(used to be called angularjs
) from the munity stubs. It appears in the list as angularjs-DefinitelyTyped
once it has been downloaded.
I don't have the reputation to reply to a ment yet, but @Precastic's solution worked for me using Webstorm 9. Note that the library name is "angular", not "angularjs", however.
To be clear, that solution was:
In short go to
File > Settings > Languages & Frameworks > JavaScript > Libraries
and downloadangular
from the munity stubs. It appears in the list as angular-DefinitelyTyped once it has been downloaded.
I had the same problem, and the only solution was to include AngularJS using a CDN as instructed on the Jetbrains blog.
You include the script tag like this:
<script src="https://ajax.googleapis./ajax/libs/angularjs/1.5.6/angular.min.js"></script>
And follow the instructions below:
If you prefer to use a CDN, place the cursor over the highlight library name, hit Alt+Enter, and Download Library. This will set up a local library in WebStorm’s cache (not in your project) so WebStorm can access AngularJS methods, directives, etc for autopletion and documentation lookup.