I made a list using Angular JS (1.x). I have to implement pagination, so I am using dirPaginate for this purpose.
Now I need to put a search box above the list box to enable the user to search among the list items, so I am using filters also.
The problem is that whatever I search for in the search box, it doesn't return anything in the search result even though the searched item exist in the list.
Below is my code:
<input type="text" ng-model="searchText"/>
<div dir-paginate="data in fiteredResults = (topics | toArray |
naturalSort | filter:searchText) | itemsPerPage: 2"
class="row topic group"
id="topic_{{data.$key | metricNameClass}}">
<div class="col-md-12">
{{data.$key}}
</div>
</div>