0
我对Angular JS很新颖。刚开始一个小时回来挖掘它。AngularJSFilter无法正常工作
我无法获得过滤器API在此页面上工作。我一片空白..
我很抱歉问这么愚蠢的问题...
jsfiddle.net/khirthane/52hN5/
我对Angular JS很新颖。刚开始一个小时回来挖掘它。AngularJSFilter无法正常工作
我无法获得过滤器API在此页面上工作。我一片空白..
我很抱歉问这么愚蠢的问题...
jsfiddle.net/khirthane/52hN5/
试试这个:
<html data-ng-app="">
<body data-ng-init="customers=[{name:'John Smith', city:'phoenix'},{name:'John gh', city:'phodafghfenix'},{name:'John gjkgukj', city:'jhjhoenix'}]">
Name: <input type="text" data-ng-model="name"/>
<ul>
<li data-ng-repeat="cust in customers | filter:name">{{ cust.name }} - {{ cust.city }}</li>
</ul>
</body>
</html>
你刚刚有一个错字。
data-ng-modal="name"
应该
data-ng-model="name"
模式不是模式 更新[小提琴](http://jsfiddle.net/Eu9WE/) – calebboyd
酷,感谢的人.... – Khirthan