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

Commit a2df3a1

Browse files
committed
fixup! fix($resource): fix interceptors and success/error callbacks
1 parent 89b8ab1 commit a2df3a1

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/ngResource/resource.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,12 +192,14 @@ function shallowClearAndCopy(src, dst) {
192192
* `request`/`requestError` interceptors are applied before calling `$http`, thus before any
193193
* global `$http` interceptors. Also, rejecting or throwing an error inside the `request`
194194
* interceptor will result in calling the `responseError` interceptor.
195-
The resource instance or collection is available on the `resource` property of the
195+
* The resource instance or collection is available on the `resource` property of the
196196
* `http response` object passed to `response`/`responseError` interceptors.
197197
* Keep in mind that the associated promise will be resolved with the value returned by the
198198
* response interceptors. Make sure you return an appropriate value and not the `response`
199-
* object passed as input. For example, the default `response` interceptor (which gets applied
200-
* if you don't specify a custom one) returns `response.resource`.
199+
* object passed as input. For reference, the default `response` interceptor (which gets applied
200+
* if you don't specify a custom one) returns `response.resource`.<br />
201+
* See {@link ngResource.$resource#using-interceptors below} for an example of using
202+
* interceptors in `$resource`.
201203
* - **`hasBody`** – `{boolean}` – If true, then the request will have a body.
202204
* If not specified, then only POST, PUT and PATCH requests will have a body. *
203205
* @param {Object} options Hash with custom settings that should extend the

0 commit comments

Comments
 (0)