$emit , $on , $broadcast
$emit
- It dispatches the event name upward in the direction & notify to registered rootscope listener
- The event transverse upward towards all root scope and calls all the registered listeners .
- The event will stop propogating if any of the listeners stops it.
$broadcast
- It dispatches event name downwards to all child scopes and notify the rootscope listener.
- The event transverse downway and notify all the registered listeners.
- This event cannot be cancelled
$on
- It listens to event of given type.
- It catches the event dispatched by $broadcast and $emit
No comments