From b063820afbef966e7697019c65bdc47dfb6c4a7b Mon Sep 17 00:00:00 2001 From: "Kent C. Dodds" Date: Fri, 24 Apr 2015 08:05:36 -0600 Subject: [PATCH] docs($q): Improve documentation of .then Adds short explanation of promise chaining and a link for further explanation. Closes #11708 --- src/ng/q.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ng/q.js b/src/ng/q.js index 3390441db613..5bf1cc80a282 100644 --- a/src/ng/q.js +++ b/src/ng/q.js @@ -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)` *