You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the issue is with totalItems and when I try to move to page 2/3/n, totalItems becomes 0 for a moment and in the process, currentPage value becomes 1 and I can't move to my desired page. So my trick is, before I call the data from server, I just set a bigger number as totalItems and after I receive data from server, I update totalItems.
$scope.totalItems = 1000;
即通过先提前初始化一个比较大的 totalItems 值
The text was updated successfully, but these errors were encountered:
当前
发现后端请求顺序
将 ui-router 从 0.2.15 升级到了 0.2.18
从 $scope.pageChanged 的条件是 $scope.currentPage 从 15 变为 1 ,而这个 $scope.currentPage 从 15 跳转到 1 目前还没找到原因
猜测
目前猜测原因如下:
网上寻求方案
angular-ui/bootstrap#5858
ui-bootstrap-pagination-resetting-current-page-on-initialization
解决方法
即通过先提前初始化一个比较大的 totalItems 值
The text was updated successfully, but these errors were encountered: