在线DEMO
angular分页插件tm.pagination(解决触发二次请求的问题)
根据条件查询
需要重新定义一个方法
$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);
}
};