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.
This commit is contained in:
Igor Minar 2011-03-26 15:23:41 -07:00
parent c06c5a36b1
commit 89c25fe713

View file

@ -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 ++;
}
}