Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit c3117b7

Browse files
Ore4444petebacondarwin
authored andcommitted
docs($q): fix a few issues
1 parent 6774438 commit c3117b7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/ng/q.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -85,30 +85,30 @@
8585
* **Methods**
8686
*
8787
* - `then(successCallback, errorCallback)` – regardless of when the promise was or will be resolved
88-
* or rejected calls one of the success or error callbacks asynchronously as soon as the result
89-
* is available. The callbacks are called with a single argument the result or rejection reason.
88+
* or rejected, `then` calls one of the success or error callbacks asynchronously as soon as the result
89+
* is available. The callbacks are called with a single argument: the result or rejection reason.
9090
*
9191
* This method *returns a new promise* which is resolved or rejected via the return value of the
9292
* `successCallback` or `errorCallback`.
9393
*
9494
*
9595
* # Chaining promises
9696
*
97-
* Because calling `then` api of a promise returns a new derived promise, it is easily possible
97+
* Because calling the `then` method of a promise returns a new derived promise, it is easily possible
9898
* to create a chain of promises:
9999
*
100100
* <pre>
101101
* promiseB = promiseA.then(function(result) {
102102
* return result + 1;
103103
* });
104104
*
105-
* // promiseB will be resolved immediately after promiseA is resolved and its value will be
106-
* // the result of promiseA incremented by 1
105+
* // promiseB will be resolved immediately after promiseA is resolved and its value
106+
* // will be the result of promiseA incremented by 1
107107
* </pre>
108108
*
109109
* It is possible to create chains of any length and since a promise can be resolved with another
110110
* promise (which will defer its resolution further), it is possible to pause/defer resolution of
111-
* the promises at any point in the chain. This makes it possible to implement powerful apis like
111+
* the promises at any point in the chain. This makes it possible to implement powerful APIs like
112112
* $http's response interceptors.
113113
*
114114
*

0 commit comments

Comments
 (0)