Angular paginate没有显示第二页

时间:2016-03-11 13:48:42

标签: javascript angularjs

我正在尝试使用这个Angular Pagination Directive流行的扩展程序进行分页,但我设法设置了几乎所有内容,但是当我点击下一页时它似乎仍然显示第一个。

我的控制器

CGRect

我的观点

.controller('FeaturedController',['$scope', function ($scope) {
    var featuredArticles = {};

    $scope.featured = featuredArticles;

    selectFeaturedArticles = function (articles) {
        for (x = 0; x < articles.length; x++) {
            if (articles[x].category == 'featured') {
                featuredArticles[x] = articles[x];
            }
        }

        return featuredArticles;
    };
    selectFeaturedArticles(articles);

    //Pagination

    $scope.currentPage = 1;
    $scope.pageSize = 3;


    $scope.pageChangeHandler = function (num) {
        console.log('going to page ' + num);
    };

}

我和Laravel一起使用Angular。

0 个答案:

没有答案