title: Returning response data from HTTP in Angular factory
body: <pre><code>.factory('Api', function($http) {
           var API = "http://127.0.0.1:4567/";
           return {
               get: function(method) {
                   return $http.get(API + method).success(function(result) {
                       return result;
                   });
               }
           }
       }
  </code></pre>
  
  <p>Then</p>
  
  <pre><code>console.log(Api.get("MAppData"));
  </code></pre>
  
  <p>Returns</p>
  
  <pre><code>Object {then: function, success: function, error: function}
  </code></pre>
  
  <p>Why does it not return the result (response data)?</p>