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.
function Ctrl($scope) {
someService.call().then(function() {
$scope.$emit('some-event');
});
}
The promise might be resolved after the controller and the scope has been destroyed, which will emit the event into thin air since all listeners on the scope have been removed, and the connection to the parent scope is removed when the scope is destroyed.
The $emit method should perhaps check this.$$destroyed and throw an error in case it is destroyed?