File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -253,7 +253,7 @@ function shallowClearAndCopy(src, dst) {
253
253
254
254
```js
255
255
var User = $resource('/user/:userId', {userId:'@id' });
256
- var user = User.get({userId:123}, function() {
256
+ User.get({userId:123}, function(user ) {
257
257
user.abc = true;
258
258
user.$save();
259
259
});
@@ -273,6 +273,16 @@ function shallowClearAndCopy(src, dst) {
273
273
});
274
274
});
275
275
```
276
+ *
277
+ * You can also access the raw `$http` promise via the `$promise` property on the object returned
278
+ *
279
+ ```
280
+ var User = $resource('/user/:userId', {userId:'@id' });
281
+ User.get({userId:123})
282
+ .$promise.then(function(user) {
283
+ $scope.user = user;
284
+ });
285
+ ```
276
286
277
287
* # Creating a custom 'PUT' request
278
288
* In this example we create a custom method on our resource to make a PUT request
You can’t perform that action at this time.
0 commit comments