I am adding elements dynamically to an array of elements and would like the directive to know that there are new elements. Therefore, inside the addItem () controller function, I am trying to do the following:
setTimeout(function(){ $rootScope.broadcast("itemAdded");
Problem: I get an error:
$rootScope.broadcast is not a function
Any clues? With pleasure send more code if you need additional information.
source share