Skip to content

Commit

Permalink
feat(core): makes $build use $extend.
Browse files Browse the repository at this point in the history
BREAKING CHANGE: $build no longer copies properties that start with $.

To migrate existing calls that need to copy properties that start with $ use angular.extend(Model.$new(), init_data) instead.
  • Loading branch information
iobaixas committed May 19, 2014
1 parent 5172aa9 commit c00ea92
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/module/restmod.js
Original file line number Diff line number Diff line change
Expand Up @@ -843,9 +843,7 @@ angular.module('plRestmod').provider('$restmod', function() {
* @return {Model} model instance
*/
$build: function(_init) {
var obj = this.$new();
angular.extend(obj, _init);
return obj;
return this.$new().$extend(_init);
},

/**
Expand Down

0 comments on commit c00ea92

Please sign in to comment.