From 6da355c3e1571b9a104fca2796df77a4194a28a2 Mon Sep 17 00:00:00 2001 From: Vojta Jina Date: Wed, 28 Mar 2012 16:03:59 -0700 Subject: refactor($compile): move methods of attr object into prototype We have many instances of this object and we clone them as well (e.g. ng-repeat). This should save some memory and performance as well. Double prefixed private properties of attr object: attr.$element -> attr.$$element attr.$observers -> attr.$$observers Update shallowCopy to not copy $$ properties and allow passing optional destination object. --- src/ng/directive/input.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ng/directive/input.js') diff --git a/src/ng/directive/input.js b/src/ng/directive/input.js index 7343c358..2f7a6a64 100644 --- a/src/ng/directive/input.js +++ b/src/ng/directive/input.js @@ -1181,7 +1181,7 @@ var ngValueDirective = [function() { attr.$set('value', scope.$eval(attr.ngValue)); }; } else { - attr.$observers.value = []; + attr.$$observers.value = []; return function(scope) { scope.$watch(attr.ngValue, function(value) { -- cgit v1.2.3