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.
angular.scope.$emit(name, args);
name – {string} –
Event name to emit.
args – {...*} –
Optional set of arguments which will be passed onto the event listeners.