Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ 13.1 angularjs plugin doesn't work

I've just upgraded my IntelliJ to 13.1. together with the angularjs plug. My problem is that the IDE doesn't recognize the angular directives anymore just saying "unknown html tag". Am I missing something?

like image 637
Adam Bogdan Boczek Avatar asked Mar 21 '14 08:03

Adam Bogdan Boczek


3 Answers

After hour of pain I've just added angular.js (not minified) in random directory in my project(before that I just had link to it in my html) and finally ng- directives have become recognized. Nor invalidating cache either adding this library in project settings didn't help.

like image 167
arctica Avatar answered Nov 12 '22 14:11

arctica


There might be some conflict with the old version the AngularJs plugin you previously had installed.

Doing a File > Invalidate Caches and Restart > Invalidate and Restart did solve the problem for me.

Intellij IDEA had to re-index the whole project, maybe the previously indexed things where using the old AngularJs Plugin scheme ...

like image 41
Timothée Jeannin Avatar answered Nov 12 '22 14:11

Timothée Jeannin


I had the same problem, I followed the steps on official website to solve it. (the way you add js library in webstorm is same as IntelliJ)

  1. Download the AngularJS framework at http://angularjs.org/.

  2. Configure AngularJS as a WebStorm JavaScript library, to let WebStorm recognize AngularJS-specific structures and provide full coding assistance:

    Open the Settings dialog box, and click JavaScript Libraries.

    In the Libraries area, click the Add button.

    In the New Library dialog box that opens, specify the name of the library.

    Click the Add button add next to the list of library files and choose Attach Files or Attach Directory on the context menu, depending of whether you need separate files or an entire folder.

    Select the Angular.js or Angular.min.js, or an entire directory in the dialog box that opens. WebStorm returns to the New Library dialog box where the Name read-only field shows the name of the selected files or folder.

    In the Type field, specify which version you have downloaded and are going to add.

    If you added Angular.js, choose Debug. This version is helpful in the development environment, especially for debugging.

    If you added the minified Angular.min.js, choose Release. This version is helpful in the production environment because the file size is significantly smaller.

reference link:https://www.jetbrains.com/webstorm/help/using-angularjs.html

like image 1
xinerd Avatar answered Nov 12 '22 14:11

xinerd