refactor(compiler): remove AppElement.initComponent

This commit is contained in:
Tobias Bosch
2016-11-01 08:21:39 -07:00
committed by vikerman
parent 953cb50fa5
commit 13533d2a30
14 changed files with 80 additions and 53 deletions

View File

@ -83,8 +83,7 @@ function generateHandleEventMethod(
const hasComponentHostListener =
directives.some((dirAst) => dirAst.hostEvents.some((event) => dirAst.directive.isComponent));
const markPathToRootStart =
hasComponentHostListener ? compileElement.appElement.prop('componentView') : o.THIS_EXPR;
const markPathToRootStart = hasComponentHostListener ? compileElement.compViewExpr : o.THIS_EXPR;
const handleEventStmts = new CompileMethod(compileElement.view);
handleEventStmts.resetDebugInfo(compileElement.nodeIndex, compileElement.sourceAst);
handleEventStmts.push(markPathToRootStart.callMethod('markPathToRootAsCheckOnce', []).toStmt());