I have set up an ngTable and the following tableParams:
var selectedItems = [];
$scope.tableParams = new ngTableParams({
page: 1, // show first page
count: 5 // count per page
}, {
total: selectedItems.length, // length of data
getData: function ($defer, params) {
$defer.resolve(selectedItems.slice((params.page() - 1) * params.count(), params.page() * params.count()));
}
});
The content of "selectedItems" is updated via a $scope.$watch that monitors the users selection from another "screen" in the single page application. However, after the user makes their selection, the "count" property in the tableParams is being ignored and it is displaying all 15 rows with no pagination options.