title: Angular chain promise immediately after the first
body: <p>I have two factories : <code>getPosition</code> gets current location, <code>geoCoding</code> uses google reverse geocoding to get the city name. Both of them use $q.defer() and both of them write the data received to local storage. I want to chain them on page load. So the position should write the current position to local storage and then geocoding should <strong>immediately</strong> decode it. I tried to chain them like that:</p>
  
  <pre><code>   getPosition.get().then(function(geoInfo){
      $scope.$storage.geoInfo = geoInfo;
      return geoCoding.get().then(function(city){
        $scope.$storage.city = city;
        $scope.city = $scope.$storage.city;
      },function(reason){
        alert("Geocoding error: " + reason);
      })
    }, function(reason){
      alert("Location error: " + reason);
    });
  </code></pre>
  
  <p>But this way i only get the position on initial page load, and i get the city on page refresh. I've read the documentation and searched stackoverflow, but i'm still missing something. How to chain the calls so that both of them are received at page load?</p>