0
//watch pagingOptions[pageSize]
$scope.$watch('pagingOptions', function(newVal, oldVal) {
if (newVal !== oldVal && newVal.pageSize !== oldVal.pageSize) {
$scope.getPagedDataAsync($scope.pagingOptions.pageSize, $scope.pagingOptions.currentPage, $scope.filterOptions.filterText);
}
}, true);
//watch pagingOptions[currentPage]
$scope.$watch('pagingOptions', function(newVal, oldVal) {
if (newVal !== oldVal && newVal.currentPage !== oldVal.currentPage) {
$scope.getPagedDataAsync($scope.pagingOptions.pageSize, $scope.pagingOptions.currentPage, $scope.filterOptions.filterText);
}
}, true);
아래의 방법으로 테스트해도 작동하지 않습니다. 작동하지 않습니다.
$scope.$watch('pagingOptions', function(newVal, oldVal) {
if (newVal !== oldVal && newVal.currentPage !== oldVal.currentPage && newVal.pageSize !== oldVal.pageSize) {
$scope.getPagedDataAsync($scope.pagingOptions.pageSize, $scope.pagingOptions.currentPage, $scope.filterOptions.filterText);
}
}, true);
$ 범위 $ 시계 (함수() { \t \t 복귀 $의 scope.pagingOptions; \t} 함수 (newval이, 인 oldval) {$ \t \t scope.getPagedDataAsync ($ scope.pagingOptions.pageSize, $ 범위 .pagingOptions.currentPage, $ scope.filterOptions.filterText); \t}, true); – Leslie
간단한 코드로 작업했습니다. 감사 – Leslie