【发布时间】:2015-02-25 12:01:12
【问题描述】:
我有两个过滤器,一个用于分页,一个用于搜索查询。它首先搜索,然后对结果进行分页。
这里是html:
<table class="table table-striped">
<tbody>
<tr ng-repeat="pot in (filteredPots = (pots | search:potQuery | paginate:currentPageNumber.pots:itemsPerPage))">
...
</tr>
</tbody>
</table>
<pagination ng-model="currentPageNumber.pots" ng-change="paging(pots)" items-per-page="{{itemsPerPage}}" total-items="filteredPots.length" class="pagination-sm"></pagination>
据我了解,这可以正常工作(我可以添加 {{ filteredPots.length }} 并显示值 10)。
我想要做的是将 total-items 值作为总数组长度(即没有将其限制为 itemsPerPage 的分页)。
非常感谢任何帮助,谢谢!
【问题讨论】:
标签: angularjs pagination angularjs-ng-repeat angularjs-filter