Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

fix($interval): do not invoke $apply when invokeApply is false #7988

Closed
wants to merge 1 commit into from

Conversation

caitp
Copy link
Contributor

@caitp caitp commented Jun 25, 2014

This CL allows $q Deferred objects to avoid invoking $rootScope.$digest, by optionally adding asynchronously invoked functions to a different queue which is processed outside of $digest.

Needless to say, this is a hack, and it would be great if there was a better way to do this (such as not using Promises for $interval at all). However, I felt that changing the API to not use promises would have been a much bigger API change than this.

Serious review needed!

Closes #7103

This CL allows $q Deferred objects to avoid invoking $rootScope.$digest, by optionally adding
asynchronously invoked functions to a different queue which is processed outside of $digest.
@caitp caitp added this to the 1.3.0 milestone Jun 25, 2014
@caitp caitp added cla: yes and removed cla: no labels Jun 25, 2014
@IgorMinar
Copy link
Contributor

as discussed with @rodyhaddad yesterday, there is no way we can do this. it breaks abstractions through several layers :)

we should just create a special $$q instance with a an async queue that is separate from digest and use deferred and promises derived from this Q instance in $timeout and $interval.

@IgorMinar IgorMinar closed this Jun 26, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

$interval invokes $rootScope.$digest() regardless of invokeApply param
2 participants