Angularjs Error $apply Already In Progress
Contents |
here for a quick overview of the site Help Center Detailed answers angular error $apply already in progress to any questions you might have Meta Discuss the
Angularjs $apply $digest Already In Progress
workings and policies of this site About Us Learn more about Stack Overflow the company angular $apply already in progress Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the $scope.$apply $digest already in progress Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up $apply already in progress error up vote 80 down vote favorite 16 Stack trace: Error: $apply already in progress at Error (
Angularjs $scope.$apply Error
beginPhase (file:///android_asset/www/built.min.js:7:22740) at Object.Scope.$apply (file:///android_asset/www/built.min.js:7:25967) at navigator.geolocation.getCurrentPosition.that (file:///android_asset/www/built.min.js:13:8670) at Object.geolocation.getCurrentPosition (file:///android_asset/www/plugins/org.apache.cordova.core.geolocation/www/geolocation.js:122:13) at Object.getCurrentPosition (file:///android_asset/www/built.min.js:13:8589) at Object.getCurrentPosition (file:///android_asset/www/built.min.js:13:8277) at Object.getCurrentCity (file:///android_asset/www/built.min.js:13:8941) at Object.$scope.locateDevice (file:///android_asset/www/built.min.js:13:10480) at file:///android_asset/www/built.min.js:7:12292:7 refers to this code http://pastebin.com/B9V6yvFu getCurrentPosition: cordovaReady(function (onSuccess, onError, options) { navigator.geolocation.getCurrentPosition(function () { var that = this, args = arguments; if (onSuccess) { $rootScope.$apply(function () { onSuccess.apply(that, args); }); } }, function () { var that = this, args = arguments; if (onError) { $rootScope.$apply(function () { onError.apply(that, args); }); } }, { enableHighAccuracy: true, timeout: 20000, maximumAge: 18000000 }); }) Strange thing, on my LG4X it works fine, however on my samsung s2 it throws the above error. Any ideas whats wrong? angularjs cordova angular-digest share|improve this question edited Jul 28 at 17:22 sfletche 6,98932742 asked Sep 5 '13 at 0:46 zabware 25.9k90244446 Have you tried stackoverflow.com/a/12859093/1266600? It might be because different devices -> different processing speeds -
{{ key }} {{ item.name }} https://docs.angularjs.org/error/$rootScope/inprog Close / {{crumb.name}} Show / Hide Table of Contents {{ navGroup.name }} {{navItem.extra.text}} {{navItem.name}} Close Loading... Back to top Super-powered by Google ©2010-2016 ( ) Code licensed under The MIT License. Documentation licensed under CC BY 3.0.
Support Search GitHub This repository Watch 58 Star 1,415 Fork 483 mbenford/ngTagsInput Code Issues 220 Pull requests 66 https://github.com/mbenford/ngTagsInput/issues/406 Projects 0 Pulse Graphs New issue Error: $apply already in progress #406 Open christiams opened this Issue Mar 19, 2015 · 27 comments Projects None yet Labels status: replied https://www.codecademy.com/en/forum_questions/5329b76b631fe985dc002136 Milestone No milestone Assignees No one assigned 15 participants christiams commented Mar 19, 2015 Error: [$rootScope:inprog] $apply already in progress http://errors.angularjs.org/1.3.14/$rootScope/inprog?p0=%24apply at REGEX_STRING_REGEXP (VM3156 angular.js:63) at beginPhase (VM3156 already in angular.js:14755) at Scope.$get.Scope.$apply (VM3156 angular.js:14499) at getFocus (VM3232 security.js:731) at Object.link.scope.eventHandlers.host.click (VM3221 ng-tags-input.js:286) at $parseFunctionCall (VM3156 angular.js:12345) at VM3161 angular-touch.min.js:12 at Scope.$get.Scope.$eval (VM3156 angular.js:14401) at Scope.$get.Scope.$apply (VM3156 angular.js:14500) at HTMLDivElement. (VM3161 angular-touch.min.js:12) to be exact it gets thrown at : host: { click: function() { input[0].focus(); } } This error is for 1.3.14 angular version? cheonhyangzhang already in progress commented Mar 20, 2015 I am seeing this error as well. I think this only happens recently. When you click on the input field for tags, this error is thrown. I don't have this issue with the old version. So I guess this might be because recent changes? Owner mbenford commented Mar 23, 2015 Are you using ng-focus along with ngTagsInput? mbenford added the status: replied label Mar 23, 2015 christiams commented Mar 23, 2015 Yep, when i comment another ng-focus the problem is solved. 2015-03-23 14:32 GMT-03:00 Michael Benford
View Course 0 points Submitted by Jessica Oo over 2 years ago Error: [$rootScope:inprog] $digest already in progress Hi together, I got this well known error when I manually actualized the scope variables by using something like this: $scope.$apply(function(){ $scope.scroll_width += sum; }); or function(){ $scope.scroll_width += sum; $scope.apply(); } In the function-body I specify vars which are used as dimensions for an iScroll-Object. If I try it like this, everything works fine but I get this error message seen in the headline, because I compute the scroll-width in the controller-body. But if I remove this $scope.$apply(); inside or around my function or change the apply-call to $scope.$$phase || $scope.$apply(); after the width-computation it doesn't work anymore... But I have to instantiate the scroller-vars in the controller-body and before this I have to compute this width-variable. So I cant compute the scroll-width outside the controller-body... Does anyone know how to solve this problem? I'm relatively new to AngularJS. Greetings!! :)