Top "Angular-promise" questions

Angular's $q promises provide a powerful abstraction over flow control.

What is the difference between Promises and Observables?

What is the difference between Promise and Observable in Angular? An example on each would be helpful in understanding both …

angular promise rxjs angular-promise angular-observable
How to access the value of a promise?

I'm looking at this example from Angular's docs for $q but I think this probably applies to promises in general. …

javascript angularjs promise angular-promise
AngularJS : Initialize service with asynchronous data

I have an AngularJS service that I want to initialize with some asynchronous data. Something like this: myModule.service('MyService', …

javascript angularjs asynchronous service angular-promise
How to cancel an $http request in AngularJS?

Given a Ajax request in AngularJS $http.get("/backend/").success(callback); what is the most effective way to cancel that …

angularjs promise angular-promise angular-http cancellation
How to return a resolved promise from an AngularJS Service using $q?

My service is: myApp.service('userService', [ '$http', '$q', '$rootScope', '$location', function($http, $q, $rootScope, $location) { var …

javascript angularjs promise angular-promise
Angular 1.6.0: "Possibly unhandled rejection" error

We have a pattern for resolving promises in our Angular app that has served us well up until Angular 1.6.0: resource.…

javascript angularjs karma-runner angular-promise angularjs-1.6
Error handling in AngularJS http get then construct

How can I handle an HTTP error, e.g. 500, when using the AngularJS "http get then" construct (promises)? $http.get(…

javascript angularjs promise angular-promise angular-http
Wait for all promises to resolve

So I have a situation where I have multiple promise chains of an unknown length. I want some action to …

angularjs promise angular-promise
angular $q, How to chain multiple promises within and after a for-loop

I want to have a for-loop which calls async functions each iteration. After the for-loop I want to execute another …

angularjs promise angular-promise deferred
javascript, promises, how to access variable this inside a then scope

I want to be able to call a function inside the .then scope, and for that I use the this.…

javascript promise angular-promise