title: Service run after Controller? returns undefined
body: <p>I'm loading json data into my app, but it always return undefined.
  After many tests and changes I found out that the service runs after the controller or at least that's what I think it does.</p>
  
  <p>Service</p>
  
  <pre><code>.factory('personService', function($http) {
      return {
          getPersons: function() {
              return $http.get('/persons.php');
          }
      }
  })
  </code></pre>
  
  <p>Controller</p>
  
  <pre><code>.controller('personsCtrl', function($scope, personService) {
     var promise = personService.getPersons();
     promise.then(
        function(response) { 
          $scope.persons = response.data;
            console.log(response.data);//first
        },
        function(response) {
            console.log('failed loading');
        });
  
      console.log($scope.persons); //last
  })
  </code></pre>
  
  <p>Console prints out the //last before the //first, which means it probably runs before it gets the data from the json file.</p>
  
  <p>Console</p>
  
  <pre><code>undefined
  [object object object]
  </code></pre>
  
  <p>Anyone has any idea what I'm doing wrong here? Thanks.</p>