mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-05-17 03:01:06 +00:00
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:
parent
c06c5a36b1
commit
89c25fe713
1 changed files with 1 additions and 1 deletions
|
|
@ -934,6 +934,7 @@ angularWidget('@ng:repeat', function(expression, element){
|
||||||
childScope[valueIdent] = collection[key];
|
childScope[valueIdent] = collection[key];
|
||||||
if (keyIdent) childScope[keyIdent] = key;
|
if (keyIdent) childScope[keyIdent] = key;
|
||||||
lastIterElement = childScope.$element;
|
lastIterElement = childScope.$element;
|
||||||
|
childScope.$eval();
|
||||||
} else {
|
} else {
|
||||||
// grow children
|
// grow children
|
||||||
childScope = createScope(currentScope);
|
childScope = createScope(currentScope);
|
||||||
|
|
@ -950,7 +951,6 @@ angularWidget('@ng:repeat', function(expression, element){
|
||||||
lastIterElement = clone;
|
lastIterElement = clone;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
childScope.$eval();
|
|
||||||
index ++;
|
index ++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue