When I click the load button, I don’t know how to loop through page and pagesize’s ng-repeat to the page!
When I click the load button, I don’t know how to loop through page and pagesize’s ng-repeat to the page!
You need to use conact to connect the data obtained after clicking to load more. pageIndex current page pageSize page number totalNumber are passed from the background.
`
//The following is written in the callback success of the request backend interface
$scope.data= $scope.data.concat(data.data);
`
Set the default current pageIndex to 1
The length of the pulled data defaults to the number of pages set by pageSize
Click the load button pageindex+1, and then call the interface to get the data
The process is roughly like this
I won’t go into details about the number of pages and some judgments