fix(compiler): make view engine work with Aot
This commit is contained in:
@ -9,6 +9,7 @@
|
||||
import {AnimationCompiler} from '../animation/animation_compiler';
|
||||
import {AnimationParser} from '../animation/animation_parser';
|
||||
import {CompileDirectiveMetadata, CompileIdentifierMetadata, CompileNgModuleMetadata, CompileProviderMetadata, componentFactoryName, createHostComponentMeta, identifierName} from '../compile_metadata';
|
||||
import {CompilerConfig} from '../config';
|
||||
import {DirectiveWrapperCompiler} from '../directive_wrapper_compiler';
|
||||
import {ListWrapper} from '../facade/collection';
|
||||
import {Identifiers, createIdentifier, createIdentifierToken} from '../identifiers';
|
||||
@ -33,9 +34,10 @@ export class AotCompiler {
|
||||
private _animationCompiler = new AnimationCompiler();
|
||||
|
||||
constructor(
|
||||
private _host: AotCompilerHost, private _metadataResolver: CompileMetadataResolver,
|
||||
private _templateParser: TemplateParser, private _styleCompiler: StyleCompiler,
|
||||
private _viewCompiler: ViewCompiler, private _dirWrapperCompiler: DirectiveWrapperCompiler,
|
||||
private _config: CompilerConfig, private _host: AotCompilerHost,
|
||||
private _metadataResolver: CompileMetadataResolver, private _templateParser: TemplateParser,
|
||||
private _styleCompiler: StyleCompiler, private _viewCompiler: ViewCompiler,
|
||||
private _dirWrapperCompiler: DirectiveWrapperCompiler,
|
||||
private _ngModuleCompiler: NgModuleCompiler, private _outputEmitter: OutputEmitter,
|
||||
private _summaryResolver: SummaryResolver<StaticSymbol>, private _localeId: string,
|
||||
private _translationFormat: string, private _animationParser: AnimationParser,
|
||||
@ -77,8 +79,10 @@ export class AotCompiler {
|
||||
...ngModules.map((ngModuleType) => this._compileModule(ngModuleType, statements)));
|
||||
|
||||
// compile directive wrappers
|
||||
exportedVars.push(...directives.map(
|
||||
(directiveType) => this._compileDirectiveWrapper(directiveType, statements)));
|
||||
if (!this._config.useViewEngine) {
|
||||
exportedVars.push(...directives.map(
|
||||
(directiveType) => this._compileDirectiveWrapper(directiveType, statements)));
|
||||
}
|
||||
|
||||
// compile components
|
||||
directives.forEach((dirType) => {
|
||||
@ -181,20 +185,35 @@ export class AotCompiler {
|
||||
hostMeta, ngModule, [compMeta.type], null, fileSuffix, targetStatements)
|
||||
.viewClassVar;
|
||||
const compFactoryVar = componentFactoryName(compMeta.type.reference);
|
||||
targetStatements.push(
|
||||
o.variable(compFactoryVar)
|
||||
.set(o.importExpr(
|
||||
createIdentifier(Identifiers.ComponentFactory), [o.importType(compMeta.type)])
|
||||
.instantiate(
|
||||
[
|
||||
o.literal(compMeta.selector),
|
||||
o.variable(hostViewFactoryVar),
|
||||
o.importExpr(compMeta.type),
|
||||
],
|
||||
o.importType(
|
||||
createIdentifier(Identifiers.ComponentFactory),
|
||||
[o.importType(compMeta.type)], [o.TypeModifier.Const])))
|
||||
.toDeclStmt(null, [o.StmtModifier.Final]));
|
||||
if (this._config.useViewEngine) {
|
||||
targetStatements.push(
|
||||
o.variable(compFactoryVar)
|
||||
.set(o.importExpr(createIdentifier(Identifiers.createComponentFactory)).callFn([
|
||||
o.literal(compMeta.selector),
|
||||
o.importExpr(compMeta.type),
|
||||
o.variable(hostViewFactoryVar),
|
||||
]))
|
||||
.toDeclStmt(
|
||||
o.importType(
|
||||
createIdentifier(Identifiers.ComponentFactory), [o.importType(compMeta.type)],
|
||||
[o.TypeModifier.Const]),
|
||||
[o.StmtModifier.Final]));
|
||||
} else {
|
||||
targetStatements.push(
|
||||
o.variable(compFactoryVar)
|
||||
.set(o.importExpr(createIdentifier(Identifiers.ComponentFactory), [o.importType(
|
||||
compMeta.type)])
|
||||
.instantiate(
|
||||
[
|
||||
o.literal(compMeta.selector),
|
||||
o.variable(hostViewFactoryVar),
|
||||
o.importExpr(compMeta.type),
|
||||
],
|
||||
o.importType(
|
||||
createIdentifier(Identifiers.ComponentFactory),
|
||||
[o.importType(compMeta.type)], [o.TypeModifier.Const])))
|
||||
.toDeclStmt(null, [o.StmtModifier.Final]));
|
||||
}
|
||||
return compFactoryVar;
|
||||
}
|
||||
|
||||
|
@ -28,6 +28,7 @@ import {StyleCompiler} from '../style_compiler';
|
||||
import {TemplateParser} from '../template_parser/template_parser';
|
||||
import {createOfflineCompileUrlResolver} from '../url_resolver';
|
||||
import {ViewCompiler} from '../view_compiler/view_compiler';
|
||||
import {ViewCompilerNext} from '../view_compiler_next/view_compiler';
|
||||
|
||||
import {AotCompiler} from './compiler';
|
||||
import {AotCompilerHost} from './compiler_host';
|
||||
@ -61,7 +62,8 @@ export function createAotCompiler(compilerHost: AotCompilerHost, options: AotCom
|
||||
genDebugInfo: options.debug === true,
|
||||
defaultEncapsulation: ViewEncapsulation.Emulated,
|
||||
logBindingUpdate: false,
|
||||
useJit: false
|
||||
useJit: false,
|
||||
useViewEngine: options.useViewEngine
|
||||
});
|
||||
const normalizer = new DirectiveNormalizer(
|
||||
{get: (url: string) => compilerHost.loadResource(url)}, urlResolver, htmlParser, config);
|
||||
@ -80,9 +82,10 @@ export function createAotCompiler(compilerHost: AotCompilerHost, options: AotCom
|
||||
compilerHost.fileNameToModuleName(fileName, containingFilePath),
|
||||
getTypeArity: (symbol: StaticSymbol) => symbolResolver.getTypeArity(symbol)
|
||||
};
|
||||
const viewCompiler = config.useViewEngine ? new ViewCompilerNext(config, elementSchemaRegistry) :
|
||||
new ViewCompiler(config, elementSchemaRegistry);
|
||||
const compiler = new AotCompiler(
|
||||
compilerHost, resolver, tmplParser, new StyleCompiler(urlResolver),
|
||||
new ViewCompiler(config, elementSchemaRegistry),
|
||||
config, compilerHost, resolver, tmplParser, new StyleCompiler(urlResolver), viewCompiler,
|
||||
new DirectiveWrapperCompiler(config, expressionParser, elementSchemaRegistry, console),
|
||||
new NgModuleCompiler(), new TypeScriptEmitter(importResolver), summaryResolver,
|
||||
options.locale, options.i18nFormat, new AnimationParser(elementSchemaRegistry),
|
||||
|
@ -11,4 +11,5 @@ export interface AotCompilerOptions {
|
||||
locale?: string;
|
||||
i18nFormat?: string;
|
||||
translations?: string;
|
||||
useViewEngine?: boolean;
|
||||
}
|
||||
|
@ -386,6 +386,25 @@ export class Identifiers {
|
||||
member: 'createRendererTypeV2',
|
||||
runtime: ɵviewEngine.createRendererTypeV2
|
||||
};
|
||||
static RendererTypeV2: IdentifierSpec = {
|
||||
name: 'RendererTypeV2',
|
||||
moduleUrl: CORE,
|
||||
// type only
|
||||
runtime: null
|
||||
};
|
||||
static ViewDefinition: IdentifierSpec = {
|
||||
name: 'ɵviewEngine',
|
||||
moduleUrl: CORE,
|
||||
member: 'ViewDefinition',
|
||||
// type only
|
||||
runtime: null
|
||||
};
|
||||
static createComponentFactory: IdentifierSpec = {
|
||||
name: 'ɵviewEngine',
|
||||
moduleUrl: CORE,
|
||||
member: 'createComponentFactory',
|
||||
runtime: ɵviewEngine.createComponentFactory
|
||||
};
|
||||
}
|
||||
|
||||
export function assetUrl(pkg: string, path: string = null, type: string = 'src'): string {
|
||||
|
@ -108,7 +108,10 @@ export class CompileMetadataResolver {
|
||||
}
|
||||
|
||||
private getDirectiveWrapperClass(dirType: any): StaticSymbol|cpl.ProxyClass {
|
||||
return this.getGeneratedClass(dirType, cpl.dirWrapperClassName(dirType));
|
||||
if (!this._config.useViewEngine) {
|
||||
return this.getGeneratedClass(dirType, cpl.dirWrapperClassName(dirType));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private getComponentViewClass(dirType: any): StaticSymbol|cpl.ProxyClass {
|
||||
|
@ -34,7 +34,7 @@ export enum BuiltinTypeName {
|
||||
Int,
|
||||
Number,
|
||||
Function,
|
||||
Null
|
||||
Inferred
|
||||
}
|
||||
|
||||
export class BuiltinType extends Type {
|
||||
@ -66,12 +66,12 @@ export class MapType extends Type {
|
||||
}
|
||||
|
||||
export const DYNAMIC_TYPE = new BuiltinType(BuiltinTypeName.Dynamic);
|
||||
export const INFERRED_TYPE = new BuiltinType(BuiltinTypeName.Inferred);
|
||||
export const BOOL_TYPE = new BuiltinType(BuiltinTypeName.Bool);
|
||||
export const INT_TYPE = new BuiltinType(BuiltinTypeName.Int);
|
||||
export const NUMBER_TYPE = new BuiltinType(BuiltinTypeName.Number);
|
||||
export const STRING_TYPE = new BuiltinType(BuiltinTypeName.String);
|
||||
export const FUNCTION_TYPE = new BuiltinType(BuiltinTypeName.Function);
|
||||
export const NULL_TYPE = new BuiltinType(BuiltinTypeName.Null);
|
||||
|
||||
export interface TypeVisitor {
|
||||
visitBuiltintType(type: BuiltinType, context: any): any;
|
||||
@ -493,7 +493,7 @@ export const SUPER_EXPR = new ReadVarExpr(BuiltinVar.Super);
|
||||
export const CATCH_ERROR_VAR = new ReadVarExpr(BuiltinVar.CatchError);
|
||||
export const CATCH_STACK_VAR = new ReadVarExpr(BuiltinVar.CatchStack);
|
||||
export const NULL_EXPR = new LiteralExpr(null, null);
|
||||
export const TYPED_NULL_EXPR = new LiteralExpr(null, NULL_TYPE);
|
||||
export const TYPED_NULL_EXPR = new LiteralExpr(null, INFERRED_TYPE);
|
||||
|
||||
//// Statements
|
||||
export enum StmtModifier {
|
||||
|
@ -102,7 +102,7 @@ class _TsEmitterVisitor extends AbstractEmitterVisitor implements o.TypeVisitor
|
||||
|
||||
visitLiteralExpr(ast: o.LiteralExpr, ctx: EmitterVisitorContext): any {
|
||||
const value = ast.value;
|
||||
if (isBlank(value) && ast.type != o.NULL_TYPE) {
|
||||
if (isBlank(value) && ast.type != o.INFERRED_TYPE) {
|
||||
ctx.print(ast, `(${value} as any)`);
|
||||
return null;
|
||||
}
|
||||
@ -152,8 +152,8 @@ class _TsEmitterVisitor extends AbstractEmitterVisitor implements o.TypeVisitor
|
||||
} else {
|
||||
ctx.print(stmt, `var`);
|
||||
}
|
||||
ctx.print(stmt, ` ${stmt.name}:`);
|
||||
this.visitType(stmt.type, ctx);
|
||||
ctx.print(stmt, ` ${stmt.name}`);
|
||||
this._printColonType(stmt.type, ctx);
|
||||
ctx.print(stmt, ` = `);
|
||||
stmt.value.visitExpression(this, ctx);
|
||||
ctx.println(stmt, `;`);
|
||||
@ -212,8 +212,7 @@ class _TsEmitterVisitor extends AbstractEmitterVisitor implements o.TypeVisitor
|
||||
ctx.print(null, `/*private*/ `);
|
||||
}
|
||||
ctx.print(null, field.name);
|
||||
ctx.print(null, ':');
|
||||
this.visitType(field.type, ctx);
|
||||
this._printColonType(field.type, ctx);
|
||||
ctx.println(null, `;`);
|
||||
}
|
||||
|
||||
@ -222,8 +221,7 @@ class _TsEmitterVisitor extends AbstractEmitterVisitor implements o.TypeVisitor
|
||||
ctx.print(null, `private `);
|
||||
}
|
||||
ctx.print(null, `get ${getter.name}()`);
|
||||
ctx.print(null, ':');
|
||||
this.visitType(getter.type, ctx);
|
||||
this._printColonType(getter.type, ctx);
|
||||
ctx.println(null, ` {`);
|
||||
ctx.incIndent();
|
||||
this.visitAllStatements(getter.body, ctx);
|
||||
@ -247,8 +245,8 @@ class _TsEmitterVisitor extends AbstractEmitterVisitor implements o.TypeVisitor
|
||||
}
|
||||
ctx.print(null, `${method.name}(`);
|
||||
this._visitParams(method.params, ctx);
|
||||
ctx.print(null, `):`);
|
||||
this.visitType(method.type, ctx, 'void');
|
||||
ctx.print(null, `)`);
|
||||
this._printColonType(method.type, ctx, 'void');
|
||||
ctx.println(null, ` {`);
|
||||
ctx.incIndent();
|
||||
this.visitAllStatements(method.body, ctx);
|
||||
@ -259,8 +257,8 @@ class _TsEmitterVisitor extends AbstractEmitterVisitor implements o.TypeVisitor
|
||||
visitFunctionExpr(ast: o.FunctionExpr, ctx: EmitterVisitorContext): any {
|
||||
ctx.print(ast, `(`);
|
||||
this._visitParams(ast.params, ctx);
|
||||
ctx.print(ast, `):`);
|
||||
this.visitType(ast.type, ctx, 'void');
|
||||
ctx.print(ast, `)`);
|
||||
this._printColonType(ast.type, ctx, 'void');
|
||||
ctx.println(ast, ` => {`);
|
||||
ctx.incIndent();
|
||||
this.visitAllStatements(ast.statements, ctx);
|
||||
@ -275,8 +273,8 @@ class _TsEmitterVisitor extends AbstractEmitterVisitor implements o.TypeVisitor
|
||||
}
|
||||
ctx.print(stmt, `function ${stmt.name}(`);
|
||||
this._visitParams(stmt.params, ctx);
|
||||
ctx.print(stmt, `):`);
|
||||
this.visitType(stmt.type, ctx, 'void');
|
||||
ctx.print(stmt, `)`);
|
||||
this._printColonType(stmt.type, ctx, 'void');
|
||||
ctx.println(stmt, ` {`);
|
||||
ctx.incIndent();
|
||||
this.visitAllStatements(stmt.statements, ctx);
|
||||
@ -369,8 +367,7 @@ class _TsEmitterVisitor extends AbstractEmitterVisitor implements o.TypeVisitor
|
||||
private _visitParams(params: o.FnParam[], ctx: EmitterVisitorContext): void {
|
||||
this.visitAllObjects(param => {
|
||||
ctx.print(null, param.name);
|
||||
ctx.print(null, ':');
|
||||
this.visitType(param.type, ctx);
|
||||
this._printColonType(param.type, ctx);
|
||||
}, params, ctx, ',');
|
||||
}
|
||||
|
||||
@ -431,4 +428,11 @@ class _TsEmitterVisitor extends AbstractEmitterVisitor implements o.TypeVisitor
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private _printColonType(type: o.Type, ctx: EmitterVisitorContext, defaultType?: string) {
|
||||
if (type !== o.INFERRED_TYPE) {
|
||||
ctx.print(null, ':');
|
||||
this.visitType(type, ctx, defaultType);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -38,8 +38,6 @@ export class ViewCompilerNext extends ViewCompiler {
|
||||
component: CompileDirectiveMetadata, template: TemplateAst[], styles: o.Expression,
|
||||
usedPipes: CompilePipeSummary[],
|
||||
compiledAnimations: AnimationEntryCompileResult[]): ViewCompileResult {
|
||||
const compName = identifierName(component.type) + (component.isHost ? `_Host` : '');
|
||||
|
||||
let embeddedViewCount = 0;
|
||||
const staticQueryIds = findStaticQueryIds(template);
|
||||
|
||||
@ -56,13 +54,14 @@ export class ViewCompilerNext extends ViewCompiler {
|
||||
new o.LiteralMapEntry('data', o.literalMap([])),
|
||||
])
|
||||
]))
|
||||
.toDeclStmt());
|
||||
.toDeclStmt(
|
||||
o.importType(createIdentifier(Identifiers.RendererTypeV2)),
|
||||
[o.StmtModifier.Final]));
|
||||
|
||||
const viewBuilderFactory = (parent: ViewBuilder): ViewBuilder => {
|
||||
const embeddedViewIndex = embeddedViewCount++;
|
||||
const viewName = viewClassName(component.type.reference, embeddedViewIndex);
|
||||
return new ViewBuilder(
|
||||
parent, component, viewName, usedPipes, staticQueryIds, viewBuilderFactory);
|
||||
parent, component, embeddedViewIndex, usedPipes, staticQueryIds, viewBuilderFactory);
|
||||
};
|
||||
|
||||
const visitor = viewBuilderFactory(null);
|
||||
@ -109,10 +108,14 @@ class ViewBuilder implements TemplateAstVisitor, LocalResolver, BuiltinConverter
|
||||
|
||||
constructor(
|
||||
private parent: ViewBuilder, private component: CompileDirectiveMetadata,
|
||||
public viewName: string, private usedPipes: CompilePipeSummary[],
|
||||
private embeddedViewIndex: number, private usedPipes: CompilePipeSummary[],
|
||||
private staticQueryIds: Map<TemplateAst, StaticAndDynamicQueryIds>,
|
||||
private viewBuilderFactory: ViewBuilderFactory) {}
|
||||
|
||||
get viewName(): string {
|
||||
return viewClassName(this.component.type.reference, this.embeddedViewIndex);
|
||||
}
|
||||
|
||||
visitAll(variables: VariableAst[], astNodes: TemplateAst[]) {
|
||||
this.variables = variables;
|
||||
// create the pipes for the pure pipes immediately, so that we know their indices.
|
||||
@ -155,7 +158,11 @@ class ViewBuilder implements TemplateAstVisitor, LocalResolver, BuiltinConverter
|
||||
}
|
||||
|
||||
build(targetStatements: o.Statement[] = []): o.Statement[] {
|
||||
const compType = o.importType(this.component.type);
|
||||
// TODO(tbosch): The old view compiler used to use an `any` type
|
||||
// for the context in any embedded view. We keep this behaivor for now
|
||||
// to be able to introduce the new view compiler without too many errors.
|
||||
const compType =
|
||||
this.embeddedViewIndex > 0 ? o.DYNAMIC_TYPE : o.importType(this.component.type);
|
||||
this.children.forEach((child) => child.build(targetStatements));
|
||||
|
||||
const updateDirectivesFn = this._createUpdateFn(this.updateDirectivesExpressions, compType);
|
||||
@ -180,16 +187,20 @@ class ViewBuilder implements TemplateAstVisitor, LocalResolver, BuiltinConverter
|
||||
});
|
||||
let handleEventFn: o.Expression;
|
||||
if (handleEventStmts.length > 0) {
|
||||
const preStmts: o.Statement[] =
|
||||
[ALLOW_DEFAULT_VAR.set(o.literal(true)).toDeclStmt(o.BOOL_TYPE)];
|
||||
if (!this.component.isHost) {
|
||||
preStmts.push(COMP_VAR.set(VIEW_VAR.prop('component')).toDeclStmt(compType));
|
||||
}
|
||||
handleEventFn = o.fn(
|
||||
[
|
||||
new o.FnParam(VIEW_VAR.name), new o.FnParam(NODE_INDEX_VAR.name),
|
||||
new o.FnParam(EVENT_NAME_VAR.name), new o.FnParam(EventHandlerVars.event.name)
|
||||
new o.FnParam(VIEW_VAR.name, o.INFERRED_TYPE),
|
||||
new o.FnParam(NODE_INDEX_VAR.name, o.INFERRED_TYPE),
|
||||
new o.FnParam(EVENT_NAME_VAR.name, o.INFERRED_TYPE),
|
||||
new o.FnParam(EventHandlerVars.event.name, o.INFERRED_TYPE)
|
||||
],
|
||||
[
|
||||
ALLOW_DEFAULT_VAR.set(o.literal(true)).toDeclStmt(o.BOOL_TYPE),
|
||||
COMP_VAR.set(VIEW_VAR.prop('component')).toDeclStmt(compType), ...handleEventStmts,
|
||||
new o.ReturnStatement(ALLOW_DEFAULT_VAR)
|
||||
]);
|
||||
[...preStmts, ...handleEventStmts, new o.ReturnStatement(ALLOW_DEFAULT_VAR)],
|
||||
o.INFERRED_TYPE);
|
||||
} else {
|
||||
handleEventFn = o.NULL_EXPR;
|
||||
}
|
||||
@ -203,7 +214,8 @@ class ViewBuilder implements TemplateAstVisitor, LocalResolver, BuiltinConverter
|
||||
[new o.ReturnStatement(o.importExpr(createIdentifier(Identifiers.viewDef)).callFn([
|
||||
o.literal(viewFlags), o.literalArr(this.nodeDefs), updateDirectivesFn, updateRendererFn,
|
||||
handleEventFn
|
||||
]))]);
|
||||
]))],
|
||||
o.importType(createIdentifier(Identifiers.ViewDefinition)));
|
||||
|
||||
targetStatements.push(viewFactory);
|
||||
return targetStatements;
|
||||
@ -225,9 +237,16 @@ class ViewBuilder implements TemplateAstVisitor, LocalResolver, BuiltinConverter
|
||||
});
|
||||
let updateFn: o.Expression;
|
||||
if (updateStmts.length > 0) {
|
||||
const preStmts: o.Statement[] = [];
|
||||
if (!this.component.isHost) {
|
||||
preStmts.push(COMP_VAR.set(VIEW_VAR.prop('component')).toDeclStmt(compType));
|
||||
}
|
||||
updateFn = o.fn(
|
||||
[new o.FnParam(CHECK_VAR.name), new o.FnParam(VIEW_VAR.name)],
|
||||
[COMP_VAR.set(VIEW_VAR.prop('component')).toDeclStmt(compType), ...updateStmts]);
|
||||
[
|
||||
new o.FnParam(CHECK_VAR.name, o.INFERRED_TYPE),
|
||||
new o.FnParam(VIEW_VAR.name, o.INFERRED_TYPE)
|
||||
],
|
||||
[...preStmts, ...updateStmts], o.INFERRED_TYPE);
|
||||
} else {
|
||||
updateFn = o.NULL_EXPR;
|
||||
}
|
||||
@ -306,7 +325,7 @@ class ViewBuilder implements TemplateAstVisitor, LocalResolver, BuiltinConverter
|
||||
let outputDefs: o.Expression[] = [];
|
||||
if (elName) {
|
||||
ast.inputs.forEach(
|
||||
(inputAst) => { hostBindings.push({context: COMP_VAR, value: inputAst.value}); });
|
||||
(inputAst) => hostBindings.push({context: COMP_VAR, value: inputAst.value}));
|
||||
if (hostBindings.length) {
|
||||
this._addUpdateExpressions(nodeIndex, hostBindings, this.updateRendererExpressions);
|
||||
}
|
||||
@ -760,7 +779,8 @@ function multiProviderDef(providers: CompileProviderMetadata[]):
|
||||
}
|
||||
return expr;
|
||||
});
|
||||
const providerExpr = o.fn(allParams, [new o.ReturnStatement(o.literalArr(exprs))]);
|
||||
const providerExpr =
|
||||
o.fn(allParams, [new o.ReturnStatement(o.literalArr(exprs))], o.INFERRED_TYPE);
|
||||
return {
|
||||
providerExpr,
|
||||
providerType: viewEngine.ProviderType.Factory,
|
||||
@ -880,6 +900,11 @@ function elementBindingDefs(inputAsts: BoundElementPropertyAst[]): o.Expression[
|
||||
o.literal(viewEngine.BindingType.ElementProperty), o.literal(inputAst.name),
|
||||
o.literal(inputAst.securityContext)
|
||||
]);
|
||||
case PropertyBindingType.Animation:
|
||||
return o.literalArr([
|
||||
o.literal(viewEngine.BindingType.ElementProperty), o.literal(inputAst.name),
|
||||
o.literal(inputAst.securityContext)
|
||||
]);
|
||||
case PropertyBindingType.Class:
|
||||
return o.literalArr(
|
||||
[o.literal(viewEngine.BindingType.ElementClass), o.literal(inputAst.name)]);
|
||||
|
Reference in New Issue
Block a user