diff options
| author | Misko Hevery | 2010-01-24 17:10:58 -0800 |
|---|---|---|
| committer | Misko Hevery | 2010-01-24 17:10:58 -0800 |
| commit | efad9ec5be8da442af5fb3dffc08510f7a71e10f (patch) | |
| tree | b6ffdda829b47b9058f0b2ccbd6ef3465ccfe0bc /src/Model.js | |
| parent | c7719c24121b500f0bc2ac7c652d8ec0de418a37 (diff) | |
| download | angular.js-efad9ec5be8da442af5fb3dffc08510f7a71e10f.tar.bz2 | |
changes to make it closure compiler compatible
Diffstat (limited to 'src/Model.js')
| -rw-r--r-- | src/Model.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Model.js b/src/Model.js index 4a3a1806..b09efd0e 100644 --- a/src/Model.js +++ b/src/Model.js @@ -3,9 +3,9 @@ function Model(entity, initial) { this['$$entity'] = entity; - this.$loadFrom(initial||{}); - this.$entity = entity['title']; - this.$migrate(); + this['$loadFrom'](initial||{}); + this['$entity'] = entity['title']; + this['$migrate'](); }; Model.copyDirectFields = function(src, dst) { @@ -25,9 +25,9 @@ Model.copyDirectFields = function(src, dst) { } }; -Model.prototype = { +extend(Model.prototype, { '$migrate': function() { - merge(this['$$entity'].defaults, this); + merge(this['$$entity']['defaults'], this); return this; }, @@ -62,4 +62,4 @@ Model.prototype = { Model.copyDirectFields(this, other); return this; } -};
\ No newline at end of file +});
\ No newline at end of file |
