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

Commit 2a60810

Browse files
jsdevelpetebacondarwin
authored andcommitted
docs($resource): clarify the meaning of @ in paramDefaults
Closes #8457
1 parent 79538af commit 2a60810

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
@@ -94,8 +94,10 @@ function shallowClearAndCopy(src, dst) {
9494
* Given a template `/path/:verb` and parameter `{verb:'greet', salutation:'Hello'}` results in
9595
* URL `/path/greet?salutation=Hello`.
9696
*
97-
* If the parameter value is prefixed with `@` then the value of that parameter will be taken
98-
* from the corresponding key on the data object (useful for non-GET operations).
97+
* If the parameter value is prefixed with `@` then the value for that parameter will be extracted
98+
* from the corresponding property on the `data` object (provided when calling an action method). For
99+
* example, if the `defaultParam` object is `{someParam: '@someProp'}` then the value of `someParam`
100+
* will be `data.someProp`.
99101
*
100102
* @param {Object.<Object>=} actions Hash with declaration of custom action that should extend
101103
* the default set of resource actions. The declaration should be created in the format of {@link

0 commit comments

Comments
 (0)