Pagination not working after loading JSON data on Ng-Table
问题 I followed the example on http://bazalt-cms.com/ for the pagination but using $http.get instead of hard-coding a variable in the controller. $http.get("data.json").success(function(data){ $scope.dataset = data; } I also moved the $scope.tableParams inside the $http.get $http.get("data.json").success(function(data){ $scope.dataset = data; $scope.tableParams = new ngTableParams({ ... } }); and changed the data variable to $scope.dataset total: $scope.dataset.length, // length of data getData: