http request angular async code example
Example: angular http async false
// add async:false to config like so to make http call blocking
return $http({
url : 'https://mywebsite.com/api_whatever.php'
method : 'GET',
async : false
}).success(function(data) {;
};