我想在可以显示的数据超过过滤器后添加分页。我已经声明一次最多只能显示 6 个数据。我想通过在表格下添加分页来显示其余数据。我该怎么做呢?
数据.html
<section>
<div>
<table style="width:90%" class="table table-bordered" align="center" ng-controller="RetrieveDiaryController">
<tr>
<th style="width:40%">Date</th>
<th style="width:30%">Type</th>
<th style="width:30%">Level</th>
</tr>
<tr ng-repeat="d in diaries | orderBy:'date':true | limitTo : limit">
<td>{{d.date | date: "dd-MM-yyyy"}}</td>
<td>{{d.taken}}</td>
<td>{{d.level}}</td>
<tr ng-show="limit" ng-click='limit = undefined'>
</tr>
</table>
</div>
</section>
健康.js
.controller('RetrieveDiaryController', ['$scope', 'Diary', function ($scope, Diary) {
$scope.diaries = Diary.find();
$scope.limit = 6;
}])