Angular.js分页代码


            $scope.reloadList=function(){
             
                $scope.findPage( $scope.paginationConf.currentPage, $scope.paginationConf.itemsPerPage);
            }
  
            $scope.paginationConf = {
         
                currentPage: 1,

                totalItems: 10,

                itemsPerPage: 10,
  
                perPageOptions: [10, 20, 30, 40, 50],
                onChange: function(){
                    $scope.reloadList();
                }
            };
   
            $scope.findPage=function(page,rows){
                $http.get('../brand/findPage.do?page='+page+'&rows='+rows).success(
                    function(response){
                     
                        $scope.list=response.rows;
                       
                        $scope.paginationConf.totalItems=response.total;//更新总记录数
                    }
                );
            }

猜你喜欢

转载自www.cnblogs.com/lijun6/p/11318196.html