diff options
| author | Igor Minar | 2011-03-26 15:23:41 -0700 |
|---|---|---|
| committer | Igor Minar | 2011-03-30 15:24:03 -0700 |
| commit | 89c25fe7136e49faa88a4b2a1922c822a5470313 (patch) | |
| tree | a14c5d1a0c02644dac3a371a9ec13ef41c73af02 | |
| parent | c06c5a36b108c6ad20776923d75eb6f32ace591b (diff) | |
| download | angular.js-89c25fe7136e49faa88a4b2a1922c822a5470313.tar.bz2 | |
call $eval in repeater only when needed
when growing children linker calls eval for new nodes, so we need
to call it only for reused nodes.
| -rw-r--r-- | src/widgets.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets.js b/src/widgets.js index 87ceb909..a5a8ee79 100644 --- a/src/widgets.js +++ b/src/widgets.js @@ -934,6 +934,7 @@ angularWidget('@ng:repeat', function(expression, element){ childScope[valueIdent] = collection[key]; if (keyIdent) childScope[keyIdent] = key; lastIterElement = childScope.$element; + childScope.$eval(); } else { // grow children childScope = createScope(currentScope); @@ -950,7 +951,6 @@ angularWidget('@ng:repeat', function(expression, element){ lastIterElement = clone; }); } - childScope.$eval(); index ++; } } |
