autoPaging bug fixed
This commit is contained in:
parent
4ce1af97df
commit
f612cab8c0
|
@ -2,13 +2,14 @@ import ngModule from '../../module';
|
|||
import getWatchers from '../../lib/get-watchers';
|
||||
|
||||
class AutoPaging {
|
||||
constructor($http, $window, $element, $timeout, vnApp, $translate) {
|
||||
constructor($http, $window, $element, $timeout, vnApp, $translate, $scope) {
|
||||
this.$http = $http;
|
||||
this.$window = $window;
|
||||
this.$element = $element;
|
||||
this.$timeout = $timeout;
|
||||
this.vnApp = vnApp;
|
||||
this.$translate = $translate;
|
||||
this.$scope = $scope;
|
||||
|
||||
this.numPerPage = null;
|
||||
this.maxItems = 0;
|
||||
|
@ -31,6 +32,7 @@ class AutoPaging {
|
|||
res.instances.forEach(item => {
|
||||
this.items.push(item);
|
||||
});
|
||||
this.$scope.$apply();
|
||||
this.checkWatchers();
|
||||
});
|
||||
if (this.index.filter.page == this.numPages) {
|
||||
|
@ -108,7 +110,7 @@ class AutoPaging {
|
|||
}
|
||||
}
|
||||
|
||||
AutoPaging.$inject = ['$http', '$window', '$element', '$timeout', 'vnApp', '$translate'];
|
||||
AutoPaging.$inject = ['$http', '$window', '$element', '$timeout', 'vnApp', '$translate', '$scope'];
|
||||
|
||||
ngModule.component('vnAutoPaging', {
|
||||
template: require('./auto-paging.html'),
|
||||
|
|
Loading…
Reference in New Issue