Any changes in the angular area should be made within the angular framework, if any changes should be made outside the framework, we should use . $ apply .
$ apply () is used to execute an expression in angular from outside the angular frame.
In your case, you call $ broadcast in setTimeout where the callback is called outside the angular scope.
So, you have two solutions: either use the $ timeout service provided by angular, or use . $ apply .
I prefer to use the $timeout function.
var ParentCtrl = function($scope, $rootScope, $timeout){ $scope.broadcast = function(){ $rootScope.$broadcast('Sup', 'Here is a parameter'); }; $timeout(function(){ $scope.$broadcast('Sup'); }, 1000);
Demo: Fiddle
Using $apply
setTimeout(function(){ $scope.$apply(function(){ $scope.$broadcast('Sup'); }); }, 1000);
source share