From 384e1fc89ab17f6a23b668b349bde1522e5a1a27 Mon Sep 17 00:00:00 2001 From: Wesley Cho Date: Sat, 11 Jun 2016 07:27:11 -0700 Subject: [PATCH] docs(q): add note about optional arguments - Add note about optional arguments in the promise.then api --- src/ng/q.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ng/q.js b/src/ng/q.js index 5b4ecf5a262c..3e834177cb80 100644 --- a/src/ng/q.js +++ b/src/ng/q.js @@ -135,7 +135,7 @@ * * **Methods** * - * - `then(successCallback, errorCallback, notifyCallback)` – regardless of when the promise was or + * - `then(successCallback, [errorCallback], [notifyCallback])` – regardless of when the promise was or * will be resolved or rejected, `then` calls one of the success or error callbacks asynchronously * as soon as the result is available. The callbacks are called with a single argument: the result * or rejection reason. Additionally, the notify callback may be called zero or more times to @@ -146,7 +146,8 @@ * 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. + * resolved or rejected from the notifyCallback method. The errorCallback and notifyCallback + * arguments are optional. * * - `catch(errorCallback)` – shorthand for `promise.then(null, errorCallback)` *