refactor(core): remove readonly getters in common, compiler (#19150)

PR Close #19150
This commit is contained in:
Yuan Gao
2017-09-11 15:10:19 -07:00
committed by Matias Niemelä
parent 996c7c2dde
commit 0c44e733ad
6 changed files with 56 additions and 52 deletions

View File

@ -114,6 +114,8 @@ class ViewBuilder implements TemplateAstVisitor, LocalResolver {
private variables: VariableAst[] = [];
private children: ViewBuilder[] = [];
public readonly viewName: string;
constructor(
private reflector: CompileReflector, private outputCtx: OutputContext,
private parent: ViewBuilder|null, private component: CompileDirectiveMetadata,
@ -126,10 +128,7 @@ class ViewBuilder implements TemplateAstVisitor, LocalResolver {
this.compType = this.embeddedViewIndex > 0 ?
o.DYNAMIC_TYPE :
o.expressionType(outputCtx.importExpr(this.component.type.reference)) !;
}
get viewName(): string {
return viewClassName(this.component.type.reference, this.embeddedViewIndex);
this.viewName = viewClassName(this.component.type.reference, this.embeddedViewIndex);
}
visitAll(variables: VariableAst[], astNodes: TemplateAst[]) {