Skip to content

Commit 0c587ea

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

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/ngResource/resource.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,11 @@ 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 would be used for multiple requests.
156+
* If you need support for cancellable $resource actions, you should upgrade to version 1.5 or
157+
* higher.
155158
* - **`withCredentials`** - `{boolean}` - whether to set the `withCredentials` flag on the
156159
* XHR object. See
157160
* [requests with credentials](https://developer.mozilla.org/en/http_access_control#section_5)

0 commit comments

Comments
 (0)