I have a bit of a head-scratcher. 

I'm trying to implement an observer service to provide $scope.$watch 
functionality to services.

I add a callback function to an object : function[] map based on the 
following logic, assuming newCallbackFunction  is the callback I'm trying 
to add


angular.forEach( thingInMyArray, function( existingFunction ) {
    if newCallBackFunction.toString() === existingFunction.toString() {
      //don't add
   }
}) 

I want to ensure that if I have two controllers with the same update method 
that they will both be notified, not just the function that was in the 
array first. Any suggestions?

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to