title: How to $http Synchronous call with AngularJS
body: <p>Is there any way to make a synchronous call with AngularJS?</p>
  
  <p>The AngularJS documentation is not very explicit or extensive for figuring out some basic stuff.</p>
  
  <p>ON A SERVICE:</p>
  
  <pre><code>myService.getByID = function (id) {
      var retval = null;
  
      $http({
          url: "/CO/api/products/" + id,
          method: "GET"
      }).success(function (data, status, headers, config) {
  
          retval = data.Data;
  
      });
  
      return retval;
  }
  </code></pre>