You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
$rootScope.$evalAsync won't work, promise is never resolved.
Using $timeout works but is clearly suboptimal as it slows the bridge & triggers useless repaints.
It looks like several people encountered the same "broken promises" issue. Thus the idea of being able to define a custom $q that would behave more like the real $q for out of scope (usually in-services) operations.
The text was updated successfully, but these errors were encountered:
I am using 1.2.0-rc1 and the issue still persists (why wouldn't it).
I have been twice bitten in the last week by the same thing when I resolved a promise outside of a $digest and ended up having my app hang because the then() clauses waiting on the promise were never called. The problem is that people who are familiar with Q in other contexts could never imagine that the then() clauses would not be resolved! Somehow there should at least be some error produced if next tick is not called within some reasonable period of time after resolve or reject are triggered. Perhaps this would even be a "debug" only check?
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm having a hard time solving $q promises not correctly resolving out of AngularJS, in my case bridging back from Cordova/PhoneGap in a service.
$rootScope.$apply
won't work, I hit the$digest already in progress
as I need several stacked calls when the app boot up (GoogleAnalytics init, PushNotifications, Udid retrieval, etc.). (actual code: https://github.com/mgcrea/angular-cordova/blob/master/src/angular-cordova.js#L37)$rootScope.$evalAsync
won't work, promise is never resolved.$timeout
works but is clearly suboptimal as it slows the bridge & triggers useless repaints.It looks like several people encountered the same "broken promises" issue. Thus the idea of being able to define a custom $q that would behave more like the real $q for out of scope (usually in-services) operations.
The text was updated successfully, but these errors were encountered: