$rootScope.Scope.$broadcast()

$broadcast(name, args);

Dispatches an event name downwards to all child scopes (and their children) notifying the registered $rootScope.Scope listeners.

The event life cycle starts at the scope on which $broadcast was called. All listeners listening for name event on this scope get notified. Afterwards, the event propagates to all direct and indirect scopes of the current scope and calls all registered listeners along the way. The event cannot be canceled.

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

Parameters

Param Type Details
name string

Event name to broadcast.

args *

Optional one or more arguments which will be passed onto the event listeners.

Returns

Object

Event object, see $rootScope.Scope

doc_AngularJS
2016-03-29 16:10:38
Comments
Leave a Comment

Please login to continue.