search

Home  >  Q&A  >  body text

javascript - angularjs filter usage problem

How to filter items with equal menu.name and menuFilter values ​​based on the input menuFilter value in angular1

    <input type="text" ng-model="menuFilter"
                     placeholder="搜索"/>
    <p ng-repeat="menu in menuList |filter:menuFilter track by $index">
      <span>{{menu.name}}</span>
      <span>{{menu.id}}</span>
    </p>
学习ing学习ing2703 days ago1486

reply all(1)I'll reply

  • typecho

    typecho2017-07-04 13:47:02

    filter:{name : menuFilter}

    reply
    0
  • Cancelreply