Quantcast
Channel: AngularJS : Prevent error $digest already in progress when calling $scope.$apply() - Stack Overflow
Browsing all 29 articles
Browse latest View live
↧

Answer by Ciul for AngularJS : Prevent error $digest already in progress when...

I had the same problem with third parties scripts like CodeMirror for example and Krpano, and even using safeApply methods mentioned here haven't solved the error for me. But what do has solved it is...

View Article


Answer by teleclimber for AngularJS : Prevent error $digest already in...

I have been able to solve this problem by calling $eval instead of $apply in places where I know that the $digest function will be running. According to the docs, $apply basically does this: function...

View Article


Answer by frosty for AngularJS : Prevent error $digest already in progress...

The digest cycle is a synchronous call. It won't yield control to the browser's event loop until it is done. There are a few ways to deal with this. The easiest way to deal with this is to use the...

View Article

Answer by lambinator for AngularJS : Prevent error $digest already in...

Handy little helper method to keep this process DRY: function safeApply(scope, fn) { (scope.$$phase || scope.$root.$$phase) ? fn() : scope.$apply(fn); }

View Article

Answer by bullgare for AngularJS : Prevent error $digest already in progress...

Sometimes you will still get errors if you use this way (https://stackoverflow.com/a/12859093/801426). Try this: if(! $rootScope.$root.$$phase) { ...

View Article


Answer by Lee for AngularJS : Prevent error $digest already in progress when...

Don't use this pattern - This will end up causing more errors than it solves. Even though you think it fixed something, it didn't. You can check if a $digest is already in progress by checking...

View Article

Answer by dnc253 for AngularJS : Prevent error $digest already in progress...

When you get this error, it basically means that it's already in the process of updating your view. You really shouldn't need to call $apply() within your controller. If your view isn't updating as you...

View Article

AngularJS : Prevent error $digest already in progress when calling...

I'm finding that I need to update my page to my scope manually more and more since building an application in angular. The only way I know of to do this is to call $apply() from the scope of my...

View Article


Answer by Sergey Sahakyan for AngularJS : Prevent error $digest already in...

let $timeoutPromise = null; $timeout.cancel($timeoutPromise); $timeoutPromise = $timeout(() => { $scope.$digest(); }, 0, false);Here is good solution to avoid this error and avoid $applyyou can...

View Article

Browsing all 29 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>