angular events - sinsunsan/archiref_wiki GitHub Wiki

  • $broadcast -- dispatches the event downwards to all child scopes,
  • $emit -- dispatches the event upwards through the scope hierarchy.

http://stackoverflow.com/questions/14502006/scope-emit-and-on-angularjs

Tuto

$emit vs $broadcast

$rootScope.$emit / $rootScope.$on

Best method for http://stackoverflow.com/questions/11252780/whats-the-correct-way-to-communicate-between-controllers-in-angularjs/19498009#19498009 because no event bubbling, but necessity to un register when the scope is destroyed to prevent creating memory leaks