Skip to content

Commit 1660ddd

Browse files
committed
docs($resource): clarify overwriting a default action
Closes angular#14821
1 parent 494d12f commit 1660ddd

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/ngResource/resource.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,12 @@ function shallowClearAndCopy(src, dst) {
132132
* Note that the parameter will be ignored, when calling a "GET" action method (i.e. an action
133133
* method that does not accept a request body)
134134
*
135-
* @param {Object.<Object>=} actions Hash with declaration of custom actions that should extend
136-
* the default set of resource actions. The declaration should be created in the format of {@link
137-
* ng.$http#usage $http.config}:
135+
* @param {Object.<Object>=} actions Hash with declaration of custom actions that will be available
136+
* in addition to the default set of resource actions (see below). If a custom action has the same
137+
* key as a default action (e.g. `save`), then the default action will be *overwritten*, and not
138+
* extended.
139+
*
140+
* The declaration should be created in the format of {@link ng.$http#usage $http.config}:
138141
*
139142
* {action1: {method:?, params:?, isArray:?, headers:?, ...},
140143
* action2: {method:?, params:?, isArray:?, headers:?, ...},

0 commit comments

Comments
 (0)