【发布时间】:2016-03-24 20:00:17
【问题描述】:
我有一个关于 AngularJS (ng-repeat) 分页的问题。
问题是,单击按钮后一切正常,其他“预测”加载。但当没有更多内容可显示时,按钮仍会显示。
也许有人可以在我的代码中找到错误。
应用链接:https://sportpredictions.firebaseapp.com/#/
GitHub上的源代码:https://github.com/NiR-IT/tennispredictions(专门用于分页的代码在scripts/controllers/browse.js和views/browse.html文件中)。
$scope.hasMoreItemsToShow = function(prediction) {
return pagesShown < ($scope.predictions.length / pageSize);
};
我认为问题一定出在这里。
【问题讨论】:
标签: javascript jquery angularjs pagination