Skip to content

Commit 94e9ef4

Browse files
committed
Merge pull request #37 from mahmoodbazdar/master
fix digest error on window resize
2 parents 723b917 + 0fd36f6 commit 94e9ef4

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

angular-scrollable-table.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,9 @@
171171
});
172172

173173
angular.element(window).on('resize', function(){
174-
$scope.$apply();
174+
$timeout(function(){
175+
$scope.$apply();
176+
});
175177
});
176178
$scope.$watch(function(){
177179
return $element.find('.scrollArea').width();
@@ -409,4 +411,4 @@
409411
function _getScale(sizeCss){
410412
return parseInt(sizeCss.replace(/px|%/, ''), 10);
411413
}
412-
})(angular);
414+
})(angular);

0 commit comments

Comments
 (0)