0
我使用AngularJS分頁來創建頁面鏈接。AngularJS分頁禁用數據加載鏈接
<pagination total-items="totalItems" max-size="'10'"
ng-model="currentPage" ng-change="pageChanged()"></pagination>
如何在數據加載時禁用鏈接?
我使用AngularJS分頁來創建頁面鏈接。AngularJS分頁禁用數據加載鏈接
<pagination total-items="totalItems" max-size="'10'"
ng-model="currentPage" ng-change="pageChanged()"></pagination>
如何在數據加載時禁用鏈接?
$scope
變量比如說,$scope.fetching = false
。將ng-disabled
添加到您的<pagination>
指令中。
<pagination total-items="totalItems" max-size="'10'"
ng-model="currentPage" ng-change="pageChanged()
ng-disabled="fetching"></pagination>
在你pageChanged
功能,在功能上設置$scope.fetching = true
和你pageChanged
功能的設置到底$scope.fetching = false