aboutsummaryrefslogtreecommitdiffstats
path: root/src/Model.js
diff options
context:
space:
mode:
authorMisko Hevery2010-01-24 17:10:58 -0800
committerMisko Hevery2010-01-24 17:10:58 -0800
commitefad9ec5be8da442af5fb3dffc08510f7a71e10f (patch)
treeb6ffdda829b47b9058f0b2ccbd6ef3465ccfe0bc /src/Model.js
parentc7719c24121b500f0bc2ac7c652d8ec0de418a37 (diff)
downloadangular.js-efad9ec5be8da442af5fb3dffc08510f7a71e10f.tar.bz2
changes to make it closure compiler compatible
Diffstat (limited to 'src/Model.js')
-rw-r--r--src/Model.js12
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