This is a general question about AngularJS.
AngularJS does not raise an event to notify when the digest cycle has ended. AngularJS suggests using $timeout as a solution to queue your work to be run after the current digest cycle (also waits for DOM rendering to be completed by the browser).
$timeout
Does anyone know how to know if $scope.$apply() and $scope.$digest() have ended without using $timeout?
$scope.$apply()
$scope.$digest()
You can use $scope.$digest(), before your business logic function or $scope.$apply(function(){/*your business*/}) but this method like timeout function.
$scope.$apply(function(){/*your business*/})
2.1m questions
2.1m answers
60 comments
57.0k users