使用UI Bootstrap进行角度分页

时间:2018-04-15 04:36:31

标签: angularjs json html5 pagination angular-ui-bootstrap

我的分页链接不可点击,更糟糕的是链接显示在文本而不是引导按钮...

- ANGULA JS CODE: ...

...
.controller('HomeCtrl',['$scope','myresource','$route','$routeParams',function($scope,myresource,$route,$routeParams){
        // console logs when I click on pagination link ...
        $scope.pageChanged = function(){
            console.log("Loading Pagination ... ");
        };
        //gets data from JSON file 
        myresource.query(function(response){            
            $scope.users  = response;   
            myArray = $scope.users;
            //object for pagination instead of premitives 
            $scope.pagi = {
                currentPage:2,
                pageSize:5,
                objlength:myArray.length            
            }   
        });     
    }])
    //slice and filter desired number of items 
    .filter('PagiFilter', function(data,start){
        return data.slice(start);   
        });
  • HTML代码:

    UserID NumberDate of birthAgeGender
                           

                                ....              

            

0 个答案:

没有答案