title: How to make angular wait for a function to return a value before proceeding
body: <p>I have function like this:</p>
  
  <pre><code>$scope.process = function(){
       $http().success(){
           return something;   
       }
  };
  </code></pre>
  
  <p>Just assume that the code is complete.. and then when I call it</p>
  
  <pre><code>alert($scope.process());
  </code></pre>
  
  <p>it displays undefined.</p>
  
  <p>How do I get the angular to wait for the return of the function before proceeding?</p>