Angularjs 如何使用ngTable ngResource和oData实现分页
有没有使用ngTable和ngResource进行服务器端分页的好例子 我正在装这样一张桌子Angularjs 如何使用ngTable ngResource和oData实现分页,angularjs,pagination,odata,ngresource,ngtable,Angularjs,Pagination,Odata,Ngresource,Ngtable,有没有使用ngTable和ngResource进行服务器端分页的好例子 我正在装这样一张桌子 function getStoreCommands() { $scope.data = storeCommandResource.query(); return $scope.data.$promise.then(function (response) { $scope.data = response; $scop
function getStoreCommands() {
$scope.data = storeCommandResource.query();
return $scope.data.$promise.then(function (response) {
$scope.data = response;
$scope.$watch("data.query", function () {
$scope.storeCommandsTableParams.reload();
});
$scope.storeCommandsTableParams = new ngTableParams({
page: 1, // show first page
count: 10, // count per page
等等
其中storeCommandResource使用ngResource。我只想按照我的ngTableParams加载前10条记录,当有人单击另一个页面时,它应该从服务器加载该页面的数据
我有经典的Web Api REST函数,在服务器端启用oData以支持ngResource
请帮忙