$q and $promise in angularjs

$q and $promise The traditional way to deal with asynchronous tasks in Javascript are callbacks; call a method, give it a function reference to execute once that method is done. 1 2 3 $.get(‘api/gizmo/42’, function(gizmo) { ¬†¬†console.log(gizmo); // or whatever }); This is pretty neat, but, it has some drawbacks; for one, combining or chaining…