File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -253,7 +253,7 @@ function shallowClearAndCopy(src, dst) {
253253
254254 ```js
255255 var User = $resource('/user/:userId', {userId:'@id' });
256- var user = User.get({userId:123}, function() {
256+ User.get({userId:123}, function(user ) {
257257 user.abc = true;
258258 user.$save();
259259 });
@@ -273,6 +273,16 @@ function shallowClearAndCopy(src, dst) {
273273 });
274274 });
275275 ```
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+ ```
276286
277287 * # Creating a custom 'PUT' request
278288 * 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