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

feat($rootScope): stopDescent method added to broadcast event #1744

Closed
wants to merge 1 commit into from

Conversation

joshrtay
Copy link
Contributor

Add stopDescent to event object.

stopDescent - {function=}: calling stopDescent function will cancel further event propagation to children (available only for events that were $broadcasted-ed).

@pkozlowski-opensource
Copy link
Member

@joshrtay what is a motivation / use case for this PR? It is missing documentation so it is hard to see what you are trying to achieve here. Did you discuss your use case on the mailing list?

@joshrtay
Copy link
Contributor Author

this is essentially the equivalent of stopPropogation for broadcasted events.

i'm working on nested views and i would like the ability to listen for the routeChangeSuccess event on a scope, stop the event's propogation to children scopes and then rebroadcast the event on that scope after doing some asynchronous work.

@joshrtay
Copy link
Contributor Author

maybe the method should be called stopPropagation instead.

stopDescent method stops $broadcast-ed events from
propagating to children.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants