In Angular $broadcast() service is always used to propagate event to all of his
child controller and it’s registered parent $rootscope.scope listeners.
$rootScope.$broadcast('SummaryEvent', {
priority: priority
});
$on() service is used to listen on any given type of event raised by $broadcast and $emit
$scope.$on(''SummaryEvent'', function (event, args) {
Vm.priority=args.priority
$emit service is
similar to $broadcast but it is used to propagate event to upwards through the scope
hierarchy and notify to the registered $rootScope.Scope listeners
Thanks for Visiting !!
Other Links :
AngularJs :scope.$watch, $watchgroup and $watchCollection
Angularjs : foreach loop
Angularjs : Model or Popup window by ngDialog API
1 comment:
This post will be very useful to us....i like your blog and helpful to me..
Angularjs 2 Development Company in India
Post a Comment