fix(ivy): move HostListeners generation to factory function (#26480)

PR Close #26480
This commit is contained in:
Andrew Kushnir
2018-10-16 10:28:23 -07:00
committed by Matias Niemelä
parent c0bf222a05
commit 2a869271f6
7 changed files with 146 additions and 34 deletions

View File

@ -102,6 +102,7 @@ export function compileInjector(meta: R3InjectorMetadata): R3InjectorDef {
type: meta.type,
deps: meta.deps,
injectFn: R3.inject,
extraStatementFn: null,
});
const expression = o.importExpr(R3.defineInjector).callFn([mapToMapExpression({
factory: result.factory,
@ -152,4 +153,4 @@ function accessExportScope(module: o.Expression): o.Expression {
function tupleTypeOf(exp: R3Reference[]): o.Type {
const types = exp.map(ref => o.typeofExpr(ref.type));
return exp.length > 0 ? o.expressionType(o.literalArr(types)) : o.NONE_TYPE;
}
}