title: Angular: Update service and share data between controllers
body: <p>I'm using a service to grab some data from an API:</p>
  
  <pre><code>angular.module('myApp', [])
  .factory('myService', function($q, $timeout) {
      var getMessages = function() {
          var deferred = $q.defer();
  
          $timeout(function() {
              deferred.resolve('Hello world!');
          }, 2000);
  
          return deferred.promise;
      };
  
    return {
      getMessages: getMessages
    };
  
  });
  </code></pre>
  
  <p>And I use these data in multiple controllers.</p>
  
  <pre><code>function ControllerA($scope, myService) {
      $scope.message = myService.getMessages();
      $scope.updateMessage = function(){
          $scope.message = 'Hello Max';        
      };
  }
  
  function ControllerB($scope, myService) {
      $scope.message = myService.getMessages();
      $scope.$watch('message', function(){
         // 'Hello Max'
      }, true);
  }
  </code></pre>
  
  <p>I would like to update the data in every controller, but when I change the $scope.message in the ControllerA, it doesn't fire a change in the ControllerB.</p>
  
  <p><strong>EDIT:</strong> The thing is that I would like to avoid using "$broadcast" and "$on".</p>
  
  <p>Any ideas?</p>
  
  <p>Here's a jsfiddle: <a href="http://jsfiddle.net/Victa/McLQD/" rel="nofollow">http://jsfiddle.net/Victa/McLQD/</a></p>