refactor(compiler): rename AppElement into ViewContainer

This commit is contained in:
Tobias Bosch
2016-11-01 11:12:25 -07:00
committed by vikerman
parent 74ede9aa9b
commit e7c00be19d
18 changed files with 65 additions and 61 deletions

View File

@ -91,7 +91,7 @@ function createQueryValues(viewValues: ViewQueryValues): o.Expression[] {
return ListWrapper.flatten(viewValues.values.map((entry) => {
if (entry instanceof ViewQueryValues) {
return mapNestedViews(
entry.view.declarationElement.appElement, entry.view, createQueryValues(entry));
entry.view.declarationElement.viewContainer, entry.view, createQueryValues(entry));
} else {
return <o.Expression>entry;
}
@ -99,11 +99,10 @@ function createQueryValues(viewValues: ViewQueryValues): o.Expression[] {
}
function mapNestedViews(
declarationAppElement: o.Expression, view: CompileView,
expressions: o.Expression[]): o.Expression {
viewContainer: o.Expression, view: CompileView, expressions: o.Expression[]): o.Expression {
var adjustedExpressions: o.Expression[] = expressions.map(
(expr) => o.replaceVarInExpression(o.THIS_EXPR.name, o.variable('nestedView'), expr));
return declarationAppElement.callMethod('mapNestedViews', [
return viewContainer.callMethod('mapNestedViews', [
o.variable(view.className),
o.fn(
[new o.FnParam('nestedView', view.classType)],