fix(compiler): codegen view query generic types
This commit is contained in:

committed by
Victor Berchet

parent
41ef4b3d4a
commit
e157a065b0
@ -106,11 +106,13 @@ function mapNestedViews(
|
||||
export function createQueryList(
|
||||
query: CompileQueryMetadata, directiveInstance: o.Expression, propertyName: string,
|
||||
compileView: CompileView): o.Expression {
|
||||
compileView.fields.push(new o.ClassField(propertyName, o.importType(Identifiers.QueryList)));
|
||||
compileView.fields.push(
|
||||
new o.ClassField(propertyName, o.importType(Identifiers.QueryList, [o.DYNAMIC_TYPE])));
|
||||
var expr = o.THIS_EXPR.prop(propertyName);
|
||||
compileView.createMethod.addStmt(o.THIS_EXPR.prop(propertyName)
|
||||
.set(o.importExpr(Identifiers.QueryList).instantiate([]))
|
||||
.toStmt());
|
||||
compileView.createMethod.addStmt(
|
||||
o.THIS_EXPR.prop(propertyName)
|
||||
.set(o.importExpr(Identifiers.QueryList, [o.DYNAMIC_TYPE]).instantiate([]))
|
||||
.toStmt());
|
||||
return expr;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user