Open ghost opened 7 years ago
var bookmark;
var self = this;
self.query = {
'limit': 10,
'offset': '',
'page': 1
};
$scope.$watch(angular.bind(this, function () {
return this.query;
}), function (newValue, oldValue) {
if(!oldValue) {
bookmark = self.query.page;
}
if(!newValue) {
self.query.page = bookmark;
}
getData();
}, true);
function getData() {
self.promise = *** request to server with self.query params (need return promise)***
}
<table class="mtable" md-table md-progress="someCtrl.promise">
</table>
<md-table-pagination md-limit="someCtrl.query.top" md-page="someCtrl.query.page"></md-table-pagination>
Hello there please let me know if your code working fine .. i would like to do same server side pagination as data is huge.. Please provide code where i need to change .. thanks in advance
Please can you show me the steps to implement pagination using back end calls by sending limit and offset values and loading the results back to the table. I have done the client side pagination and sincey data base consist of large amount of data i need to swith to server side data loading when changing pages Thanks in advance