I am newbie on AngularJS.
Search result can be displayed in one page but why the next and previous button is showing ?
http://jsfiddle.net/2ZzZB/1473/
<input type="text" id="txtNotessearch" ng-model="search_notes" class="form-control input-sm" placeholder="SEARCH">
...
<ul>
<li ng-repeat="item in data | filter:search_notes | startFrom:currentPage*pageSize | limitTo:pageSize">
{{item}}
</li>
</ul>
Correct me, if I am wrong.
In case, you want to hide the
next
andprevious
button when the result can be displayed in one page, please see the fiddle here: http://jsfiddle.net/rLots5zd/3/Because NumberOfPages is not filtered. Instead of using $scope.data.length, you should use the length after the filter.
In addition, I would modify the ng-disable next button to
And I would add to search_notes onchange currentPage=1.
Here you have the fiddle http://jsfiddle.net/rLots5zd/