Open g-viet opened 5 years ago
Sometimes we got this when trying running $scope.apply() manually:
$scope.apply()
Error: $digest already in progress
There are 2 ways to solve this:
$scope.applyAsync()
$timeout
$digest
$scope.$$phase
if (!$scope.$$phase) { // $digest or $apply here }
But we should avoid using $scope.apply() manually, it is easy to crash
Sometimes we got this when trying running
$scope.apply()
manually:There are 2 ways to solve this:
$scope.applyAsync()
instead$scope.apply()
with$timeout
$digest
is already in progress by$scope.$$phase
:But we should avoid using
$scope.apply()
manually, it is easy to crash