mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-01-12 22:45:52 +08:00
copy response into resource on save. update jstestdriver
This commit is contained in:
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);
|
||||
});
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user