docs($q): improve documentation of promises that resolve with another promise

Adds short explanation of promise chaining and a link for further explanation.

Closes #11708
Closes #11712
This commit is contained in:
Kent C. Dodds
2015-04-24 08:05:36 -06:00
committed by Peter Bacon Darwin
parent c10b249e3d
commit 4eb16ae4b7
+5 -3
View File
@@ -140,9 +140,11 @@
* provide a progress indication, before the promise is resolved or rejected.
*
* This method *returns a new promise* which is resolved or rejected via the return value of the
* `successCallback`, `errorCallback`. It also notifies via the return value of the
* `notifyCallback` method. The promise cannot be resolved or rejected from the notifyCallback
* method.
* `successCallback`, `errorCallback` (unless that value is a promise, in which case it is resolved
* with the value which is resolved in that promise using
* [promise chaining](http://www.html5rocks.com/en/tutorials/es6/promises/#toc-promises-queues)).
* It also notifies via the return value of the `notifyCallback` method. The promise cannot be
* resolved or rejected from the notifyCallback method.
*
* - `catch(errorCallback)` shorthand for `promise.then(null, errorCallback)`
*