【发布时间】:2014-06-21 05:02:32
【问题描述】:
在我的控制器中,我有以下从数据库获取数据的代码。
$scope.noOfPages = 0;
$scope.currentPage = 1;
$scope.maxSize = 5;
$scope.tickets = TicRepository.getTics.query({ id: $routeParams.t_id }, function (data) {
$scope.tickets = data.items;
$scope.noOfPages = data.totalPages,
$scope.currentPage = data.pages;
});
在我的html中我有
<div>
div>
{{noOfPages}} {{currentPage}} {{maxSize}}
<pagination num-pages="noOfPages" current-page="currentPage"></pagination>
</div>
<div ng-repeat="tics in tickets " >
................
</div>
</div>
我的数据很好,但分页不起作用。在分页按钮中,它只显示 1 页并列出所有项目。请让我知道如何解决此问题。 谢谢
【问题讨论】:
-
你能发布一个小提琴或 plunker 吗?没有看到你的指令也很难说。
标签: javascript jquery angularjs