angularjs - angular.js boradcast error: $rootScope.broadcast is not a function -


i adding items dynamically array of items , let directive know there new items. inside controller function additem() trying following:

settimeout(function(){     $rootscope.broadcast("itemadded");     // tried: $scope.broadcast("itemadded"); isn't working }); 

problem: i'm getting error:

$rootscope.broadcast not function 

any clues? happy post more code if need more information.

its typo :

$rootscope.$broadcast(name, args) 

Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -