how to search by display text in html column in angularjs

落花浮王杯 提交于 2019-12-12 03:39:31

问题


hi all i am using angularjs Mean Stack . now i bind the data in html table using ng-repeat it's work's nice and i have add one functionality name is called filter option but its not woking because i stored id values into db but when i bind show the values related to that id now in db there is id and show related values now filter working based on that id only not filtered by showing text i need filter by showing values Thanks Help

code

      <table class="table table-striped table-bordered table-list" >
       <thead>
        <tr>
     <th style="width: 25%" align="center">
       <a href="" ng-click="orderByField='RoleName'; reverseSort = !reverseSort">Name</a>
</th>

 <th style="width: 30% " align="center">
 <a href="" ng-click="orderByField='IsActive'; reverseSort = !reverseSort">IsActive?</a>
  </th>

    </tr>
 </thead>

<tbody>
 <tr>
 <td>
  <input type="text" id="RoleNameID" ng-model="Manage_Role1.RoleName" placeholder="search" class="searchbox" />
  </td>

</tr>
 <tr dir-paginate="Manage_Role in Manage_Roleser | itemsPerPage:8 | filter:Manage_Role1 | orderBy:orderByField:reverseSort " ng-class-odd="'odd'">
  <td >
 <span e-ng-change="applyHighlight($data)" editable-text="Manage_Role.RoleName" ng-attr-title="{{Manage_Role.RoleName}}"e-form="rowform" >
  {{ Manage_Role.RoleName || 'empty' }}
 </span>
 </td>
   </span>
 </tr>
 </tbody>
  </div>
</table>

Here i stored the role id into db but i will show name based that id it's wokring fine but filter woking based id i want filter based displayed values

来源:https://stackoverflow.com/questions/43513345/how-to-search-by-display-text-in-html-column-in-angularjs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!