title: How to watch array or object change in service?
body: <p>I have service in my angular app. This service provide access to array with some operations (access is provided to many controllers, they all need to watch this variable). </p>
  
  <p>But how to watch changes from this service? It does not have $scope, and I don't know, where to find $watch?</p>
  
  <p>Here is my service code:</p>
  
  <pre><code>(function(){
      angular.module('something')
          .factory('MasterService',['$http', function($http){
              var service = this;
              var data = {                
                  operations: [] // this array need to be accessible from controllers
              };
  
              $http.get('some/url').success(function(data){
                  // here we mofidy array with loaded from server
                  data.operations = angular.copy(data.operations);
              });
  
              return {
                  // controllers will receive operations via this method
                  getOperations: function () {
                      return data.operations;
                  }
              };
          }])
  })();
  </code></pre>
  
  <p>How to watch operations variable from within this service? I need to add something like that:</p>
  
  <pre><code>        operations.$watch(function(){
              //make some actions with operations
          });
  </code></pre>