rapid.controller('HomeListController',
['$scope', 'adminSvc','pagerOptions',
functionauditLogCtrl($scope,adminSvc,pagerOptions) {$scope.pagingOptions = pagerOptions.newOptions();
$scope.pagingOptions.sortBy = "CreatedDate";
$scope.pagingOptions.itemsPerPage = 10;
$scope.pagingOptions.onPageChange = loadData; //loadData is a method load the data to the page.var numberOfSearchPerfomed = 0;
$scope.data= {};
functionloadData() {$scope.pagingOptions.filters = selectedFilters;
service.getData(vm.pagingOptions) //Method will fetch data from db and show in the view based on pagingOptions.
.success(function(result) {$scope.data= result.Data;
$scope.pagingOptions.totalItems = result.TotalCount; // TotalCount represents the total number of records not page wise.$scope.enableResetButton = numberOfSearchPerfomed >= 1;
});
}
loadData();
}])