How to enable AngularJS support for an existing project in WebStorm 8?
WebStorm 8 comes with improved AngularJS support, which is enabled "when AngularJS is discovered in your project". But how is this discovered?
I have a large AngularJS project that started in WebStorm 7. I'm now running WebStorm 8, but AngularJS support for this project is not yet enabled.
Two possible reasons might be that [1] I renamed the bower_components directory to client/lib (with corresponding .bowerrc file) and that [2] AngularJS is being loaded by RequireJS. Or maybe it's simply a matter of an existing project transitioning between the two versions?
I can't figure out how to enable support.
Some help would be greatly appreciated! :-)
Please sign in to leave a comment.
Hi there,
You must have AngularJS file somewhere in your project (not minified version).
Hi,
Thanks for that. Yes, indeed. Upon closer inspection, it seems that AngularJS support is in fact enabled, as I have autocomplete for ng-controller and such.
I was thrown off because none of my custom directives get recognized or autocompleted. And the directive method in app.directive('name', function () {...}) is not recognized ("unresolved function or method"). My custom directives, as well as the app module, are loaded through RequireJS. Could that be the problem?
I would love to properly integrate my custom directives.
Thanks!
Completion for custom directives works for me, and directive() method is resolved
Please provide a sample project that shows up the way you load/define your directives
Here you go: https://github.com/mhelvens/angular-test
For some reason, `app.directive` is recognized now, but the custom directive is not recognized in index.html.
Thanks!
Logged as http://youtrack.jetbrains.com/issue/WEB-12167, please vote for it to be notified on any progress
Thanks (again) for your active support. :-)
Cheers!