title: AngularJS $http call in a Service, return resolved data, not promises
body: <p>I want to know if it is possible to make a service call that uses <code>$http</code> so it returns data directly without returning a promise? I have tried to use the <code>$q</code> and defer without any luck.</p>
  
  <p>Here is what I mean:</p>
  
  <p>I have a service:</p>
  
  <pre><code>angular.module('myModule').factor('myService', ['$http', '$q',
      function($http, $q) {
  
          // Public API
          return {
              myServiceCall: function() {
                  return $http.get('/server/call');
              }
          };
      }
  ]);
  </code></pre>
  
  <p>And this is how I would call it:</p>
  
  <pre><code>// My controller:
  myService.myServiceCall().then(function(data) {
    $scope.data = data;
  });
  </code></pre>
  
  <p>I want to avoid that and instead wish to have:</p>
  
  <pre><code>$scope.data = myService.myServiceCall();
  </code></pre>
  
  <p>I want it to be fully resolved at that line, is it possible?</p>
  
  <p>I have tried some combinations of $q, defer and 'then' methods but can't seem to get it right since the method returns immediately.</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>If you are wondering why, the main reason is that I wanted to simplify the controller code, this is easily done with ngResource as those calls are automatically resolved in templates, so I wanted to avoid the need to do the the whole '.then' everytime.</p>
  
  <p>It's not that I don't like the Async nature, most of our code leverages it, it's just in <strong>some</strong> cases, having a synchronous way is helpful.</p>
  
  <p>I think for now as some of you have pointed out, I will use the $resource for a near enough solution.</p>