mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-16 23:30:23 +00:00
copy response into resource on save. update jstestdriver
This commit is contained in:
parent
e3565dfea6
commit
f9f181a33e
2 changed files with 5 additions and 1 deletions
Binary file not shown.
|
|
@ -107,7 +107,11 @@ ResourceFactory.prototype = {
|
|||
default:
|
||||
throw "Expected between 1-3 arguments [params, data, callback], got " + arguments.length + " arguments."
|
||||
}
|
||||
Resource[name](params, this, callback);
|
||||
var self = this;
|
||||
Resource[name](params, this, function(response){
|
||||
copy(response, self);
|
||||
callback(self);
|
||||
});
|
||||
};
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue