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.
fix($rootScope): avoid unstable reference in $emit event
The event.currentScope in `$emit` method was a reference to an iterator. When accessing asynchronously, the event.currentScope was the $rootScope (end of the do/while loop) instead of the scope which listen the event.
The `$emit` and `$broadcast` methods use the same syntax now. Both methods are tested with :
- sync/async access to `event.currentScope` and `event.targetScope`.
- a test case for `preventDefault()` and `defaultPrevented`.
0 commit comments