how to search by display text in html column in an

2019-09-14 20:44发布

问题:

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