-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add fluxProvider.useEvalAsync() #67
Conversation
Wraps all calls to callbacks registered with $listenTo in $applyAsync
Unfortunately this repo is unmantained now, since @christianalfoni not interested in it. Feel free to start a fork or ask @christianalfoni to transfer repo maintainance. |
@Guria I'm still using it heavily and @christianalfoni gave me repo rights a while ago. If it'd be better to have repo transferred entirely let me know. |
@afiedler code looks good. Curious if you think |
@jrust oh, sorry for misinformation. Glad that there is active maintainer here. |
No problem @Guria @afiedler just saw your comment on the other issue on speed. Tried it out locally and the |
@jrust, yeah I just tested it with $evalAsync on my project and that works fine. I pushed two commits that make the change to this PR. I'm not sure about the default. It seems like this is the "proper" way to do it. The issue is that baobab runs its callbacks in a I guess I'll leave the decision on the default up to you 😄 . As long as I don't have to litter my code with |
I agree. I think its saner and safer behavior to be default true. If you can make it true by default I'll merge it in and make a release |
@jrust, I changed the default of |
Looks great, thanks for your work on this. |
Adds an optional setting to
fluxProvider
to cause theflux
service to wrap all$scope.$listenTo
callbacks in$scope.$applyAsync
.This fixes #66, where in some cases the
$listenTo
callbacks were getting called outside of the digest cycle.This is inspired by the
useApplyAsync
option in the$http
service in Angular.