为了账号安全,请及时绑定邮箱和手机立即绑定

angular JS 里的filter怎么不起作用?

angular JS 里的filter怎么不起作用?

慕标8997690 2017-03-02 23:02:16
<!doctype html><html><head><meta charset="utf-8"><title>AngularJS example2</title><style>   body{      background-color:#ddf;      font:16px bold Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;   }   input{      padding:10px;   }   #list-container{      background-color:white;      color:#448;      border-radius:25px;      border:1px solid black;      padding:25px;   }</style><script src="http://cdn.static.runoob.com/libs/angular.js/1.4.6/angular.min.js"></script></head><body ng-app><p>Search Departments:<input type="text" placeholder="Enter search string" ng-model="searchString"></p><div ng-init="departments = [   {name:'Sales', contact:'Marsha Brown'},   {name:'Support', contact:'Dave Price'},   {name:'Production', contact:'Grant Wales'},   {name:'Service', contact:'Sherry Dell'},   {name:'Administration', contact:'Sally Bennett'},   {name:'Accounting', contact:'Kim Sutherland'},   {name:'Shipping', contact:'Sandy Connell'}]"></div><div id="list-container">   <ul>      <li ng-repeat="dept in departments | filter: searchString">{{dept.name + "("+ dept.contact +")"}}</li>   </ul></div></body></html>
查看完整描述

目前暂无任何回答

  • 0 回答
  • 0 关注
  • 1614 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信