I had a similar problem watching a variable in $ rootScope from a child controller and "opening" this controller more times. Each time I open the controller, it seems that angular adds another observer, and when the variable changes, the observer fires more times.
I solved this problem by adding an observer and broadcasting a custom event to the parent controller (AppCtrl), and on the child controller (ChildCtrl) that listened for this event:
AppCtrl:
$rootScope.$watch('myVar', function(myVar){ if(myVar){ var obj = doSomethingWithMyVar(myVar); $scope.$broadcast('myEventName', obj); } });
ChildCtrl:
$scope.$on('myEventName', function(event, obj){ console.log(obj); });
source share