title: Angular: Returning a $q.defer().promise instead of an $http promise
body: <p>Watching a lot of Egghead.io videos, I noticed that a common pattern is to return a custom promise and resolve it in the callbacks.</p>
  
  <pre><code>.factory('myFact', function($q, $http) {
      return {
          getData: function() {
              var deferred = $q.defer();
              $http.get('/path/to/api')
                  .success(function(data) {
                      deferred.resolve(data);
                  });
              return deferred.promise;
          }
      };
  });
  </code></pre>
  
  <p>I would normally write this as:</p>
  
  <pre><code>.factory('myFact', function($http) {
      return {
          getData: function() {
              return $http.get('/path/to/api')
                  .then(function(res) {
                      return res.data;
                  });
          }
      };
  });
  </code></pre>
  
  <p>Is there any advantage to returning a <code>$q.defer()</code> promise rather than an <code>$http</code> promise?  The approaches look identical to me.</p>