angular分页插件tm.pagination 解决触发二次请求的问题

angular分页插件tm.pagination(解决触发二次请求的问题)

DEMO:  http://jqvue.com/demo/tm.pagination/index.html#?currentPage=1


根据条件查询
需要重新定义一个方法

$scope.paginationConf = {
            currentPage: $location.search().currentPage ? $location.search().currentPage : 1,
            totalItems: 8000,
            itemsPerPage: 15,
            pagesLength: 15,
            perPageOptions: [10, 20, 30, 40, 50],
            onChange: function(){
                console.log($scope.paginationConf.currentPage);
                $location.search('currentPage', $scope.paginationConf.currentPage);
            }
        };

 

posted @ 2017-02-09 17:34  Cynthia娆墨旧染  阅读(2887)  评论(0编辑  收藏  举报