| Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
Uses the changes from @jamestalmage's fix in #3535. (thanks!)
Closes #3535
|
|
BREAKING CHANGE: the `always` method has been renamed to `finally`.
The reason for this change is to align `$q` with the Q promises library,
despite the fact that this makes it a bit more difficult to
use with non-ES5 browsers, like IE8.
`finally` also goes well together with `catch` api that was added to
$q recently and is part of the DOM promises standard.
To migrate the code follow the example below:
Before:
$http.get('/foo').always(doSomething);
After:
$http.get('/foo').finally(doSomething);
or for IE8 compatible code:
$http.get('/foo')['finally'](doSomething);
|
|
Now we can instead this
promise.then(null, errorHandler)
with this
promise.catch(errorhandler)
Closes #2048
Closes #3476
|
|
Normally $exceptionHandler doesn't throw an exception. It is normally
used just for logging and so on. But if an application developer
implemented a version that did throw an exception then $q would never
have called reject() when converting an exception thrown inside a `then`
handler into a rejected promise.
|
|
It is now possible to notify a promise through deferred.notify() method.
Notifications are useful to provide a way to send progress information
to promise holders.
|
|
|
|
Add $q.always(callback) method that is always called whether the promise is successful or fails; includes unit tests and updates
documentation.
|
|
When waiting for several promises at once, it is often desirable to
have them by name, not just by index in array.
Example of this kind of interface already implemented would be a
$routeProvider.when(url, {resolve: <hash of promises>}), where
resources/promises are given by names, and then results accessed
by names in controller.
|
|
$q.reject('some reason').then() should not blow up, but correctly
forward the callbacks instead.
Closes #845
|
|
|