Getting angularJS autcomplete in Webstorm/PHPStorm

angularjs, phpstorm, webstorm

Solution

If you don't already have angular set up, go to Preferences > Project Settings > Javascript > Libraries and add your version of angular.

As for autocomplete in html strings, I don't think that's going to happen with the current version of PHPStorm, but in most other places, it should do the trick.

Problem

How do I get auto-complete for angularjs syntax in strings. For example: `myscript.js` ``` var List = function ($scope) { $scope.names = [ "Ahmed", "Tom", "David", "Jessie" ]; }; ``` HTML ``` <div> <label for="get_name"> Find your name: <input type="search" name="search" id="search" ng-model="search"/> </label> </div> <div ng-controller="List"> <ul> <li ng-repeat="name in names | filter:search">{{ name }}</li> </ul> </div> <script type="text/javascript" src="angular_1.0.7.js"></script> <script type="text/javascript" src="myscript.js"></script> ``` This is basically a way to search to names. How do I get auto-complete to appear inside `<li ng-repeat="name in names | filter:search">{{ name }}</li>` inside `ng-repeat`. I am using PHPStorm 6.0.3.

Original source