angular.scope.$emit

Description

Dispatches an event name upwards through the scope hierarchy notifying the registered angular.scope.$on listeners.

The event life cycle starts at the scope on which $emit was called. All listeners listening for name event on this scope get notified. Afterwards, the event traverses upwards toward the root scope and calls all registered listeners along the way. The event will stop propagating if one of the listeners cancels it.

Any exception emmited from the listeners will be passed onto the $exceptionHandler service.

Usage

angular.scope.$emit(name, args);

Parameters