title: controller gets factory data before data is set
body: <p>I have a simple factory that looks like this</p>
  
  <pre><code>myApp.factory('eventFactory', function(){
      var events = [];
  
      return {
          getEvents : function(){
              return events;
          },
          setEvent : function(event){
              events.push(event);
          }
      }
  });
  </code></pre>
  
  <p>and when my application loads I run a promise to load events from a remote server, when promise is returned I run: <code>$scope.eventFactory.setEvent(event);</code> to set these returned events to the event factory.</p>
  
  <p>In my other controller I want to set these events to a <code>$scope</code> variable, so I inject the <code>eventFactory</code> and do this:</p>
  
  <pre><code>$scope.eventFactory = eventFactory;
  $scope.events = $scope.eventFactory.getEvents();
  </code></pre>
  
  <p>problem is this also runs when application is first loaded, before the promise has returned my events, so my <code>events</code> array in my factory is empty, hence my <code>$scope.events</code> in my second controller is also empty, and it doesn't update when promise is returned.</p>
  
  <p>How do I update <code>$scope.events</code> in my second controller when promise is returned in my first controller?</p>