Skip to content

Commit c00ea92

Browse files
committed
feat(core): makes $build use $extend.
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.
1 parent 5172aa9 commit c00ea92

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/module/restmod.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -843,9 +843,7 @@ angular.module('plRestmod').provider('$restmod', function() {
843843
* @return {Model} model instance
844844
*/
845845
$build: function(_init) {
846-
var obj = this.$new();
847-
angular.extend(obj, _init);
848-
return obj;
846+
return this.$new().$extend(_init);
849847
},
850848

851849
/**

0 commit comments

Comments
 (0)