What is $emit, $broadcast and $on in AngularJS ?

devquora
devquora

Posted On: Feb 22, 2018

 

    2 Answers Written

  •  devquora
    Answered by Farheen

    $emit is basically emitter in angular js. $emit dispatches an event name upwards through scope hierarchy and notifies the registered $rootScope.Scope listeners. The event life cycle starts at the scope on which $emit was called.

    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. $emit has its own listeners.

  •  devquora
    Answered by Rafnas T PAdd more questions and answers on c#

Related Questions

Please Login or Register to leave a response.

Related Questions