Async functions with AngularJS

The best feature that I have encountered with AngularJS is programming async functions. The best example of using async functions is the $http service. To make a web request, the following javascript code can be used:

The $http function returns a promise object. The promise object has a then function which has two arguments: onSuccess callback, onFailure callback. If[…]

Read more