Closed baijiezi closed 9 years ago
I had problem to recreate the bug, can you please show me your implementation.
angular.module('healthApp') .controller('HospitalReport2Ctrl', ['$rootScope', '$scope', '$state', '$http','$filter', function ($rootScope, $scope, $state, $http, $filter, $cookieStore) { $scope.startDate = new Date(new Date()-1000_60_60_24_2); $scope.endDate = new Date(new Date()-1000_60_60*24); $scope.templateUrl = 'views/templates/p.html'; $scope.count = 100; $scope.page = 1;
$scope.init = {
'count': $scope.count,
'page': $scope.page
};
$scope.filterBy = {
'startDate': $filter('date')($scope.startDate, 'yyyy-MM-dd'),
'endDate': $filter('date')($scope.endDate, 'yyyy-MM-dd')
};
$scope.getResource = function (params, paramsObj) {
params = params.replace(new RegExp('count', 'g'), 'per_page');
var urlApi = restUrl + '/statements/hospitalTransRecord?' + params;
return $http.get(urlApi).then(function (response) {
return {
'rows': response.data.data.pageList,
'header': [
{
"key": "hospitalName",
"name": "Hospital"
},
{
"key": "merchantId",
"name": "MerchanId"
},
{
"key": "payCardNo",
"name": "PayCard"
}
],
'pagination': {
"count": response.data.data.pageSize, //100
"page": response.data.data.curPage, //1
"pages": response.data.data.totalPage, //9
"size": response.data.data.totalCount //852
}
}
});
}
}])
{{ row.hospitalName }} | {{ row.merchantId }} | {{ row.payCardNo }} |
The problem has been resolved by update ng-tasty to v0.5.7. Thank you.
Yeee :-) :+1: ThankYou
Hello: I return the pagination form the js file like this:
When I click the remaining button to change pages, it can show page 16, but can't show the page 22.
on the right of the page,it show this info: Page 1 of 22, of 2158 entries