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

Php - Delimiter must not be alphanumeric or backslash -

c# - How to change the "Applies To" field under folder auditing options programatically (.NET) -

c++ - Ambiguity when using boost::assign::list_of to construct a std::vector -