You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
varmyModule=angular.module('myModule',[]);myModule.run(function($rootScope){/* Receive emitted message and broadcast it. Event names must be distinct or browser will blow up! */$rootScope.$on('handleEmit',function(event,args){$rootScope.$broadcast('handleBroadcast',args);});});functionControllerZero($scope){$scope.handleClick=function(msg){$scope.$emit('handleEmit',{message: msg});};}functionControllerOne($scope){$scope.$on('handleBroadcast',function(event,args){$scope.message='ONE: '+args.message;});}functionControllerTwo($scope){$scope.$on('handleBroadcast',function(event,args){$scope.message='TWO: '+args.message;});}ControllerZero.$inject=['$scope'];ControllerOne.$inject=['$scope'];ControllerTwo.$inject=['$scope'];