Skip to content

Commit 96e7d80

Browse files
committed
docs($resource): add note about _promises as timeout_ not being supported
Fixes part of angular#13393.
1 parent a758d58 commit 96e7d80

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/ngResource/resource.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,10 @@ function shallowClearAndCopy(src, dst) {
150150
* GET request, otherwise if a cache instance built with
151151
* {@link ng.$cacheFactory $cacheFactory}, this cache will be used for
152152
* caching.
153-
* - **`timeout`** – `{number|Promise}` – timeout in milliseconds, or {@link ng.$q promise} that
154-
* should abort the request when resolved.
153+
* - **`timeout`** – `{number}` – timeout in milliseconds.<br />
154+
* **Note:** In contrast to {@link ng.$http#usage $http.config}, {@link ng.$q promises} are
155+
* **not** supported in $resource, because the same value has to be re-used for multiple
156+
* requests.
155157
* - **`withCredentials`** - `{boolean}` - whether to set the `withCredentials` flag on the
156158
* XHR object. See
157159
* [requests with credentials](https://developer.mozilla.org/en/http_access_control#section_5)

0 commit comments

Comments
 (0)