如何在字符串中自动完成 angularjs 语法。例如:
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>
这基本上是一种搜索名称的方法。如何让自动完成出现在里面<li ng-repeat="name in names | filter:search">{{ name }}</li>
inside ng-repeat
.
我正在使用 PHPStorm 6.0.3。
您可以使用 John Lindquist 提供的很棒的 AngularJS 插件。http://plugins.jetbrains.com/plugin/6971 http://plugins.jetbrains.com/plugin/6971
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)