我要如何自动完成字符串中的angularjs语法。例如:
How do I get auto-complete for angularjs syntax in strings. For example:
myscript.js
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>
这基本上是搜索到名称的方式。我如何获得自动完成出现在&LT;李NG重复=名称名称|过滤器:搜索&GT; {{名}}&LT; /李&GT;
NG-重复内
。
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
.
我使用PHPStorm 6.0.3。
I am using PHPStorm 6.0.3.
如果您还没有棱角成立,到preferences>项目设置>的JavaScript>库并添加您的角度版本。
If you don't already have angular set up, go to Preferences > Project Settings > Javascript > Libraries and add your version of angular.
至于在HTML字符串自动完成,我不认为这将与PHPStorm当前版本的情况发生,但在大多数其他地方,它应该做的伎俩。
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.