【发布时间】:2018-09-11 09:34:41
【问题描述】:
尝试在 AOT 中构建时遇到 Property 'Y' does not exist on type 'Component name' 异常。
ExampleComponent.html
<header [EXAMPLE1]="Y" [EXAMPLE2]="Y"></header>
Header.ts
@Input() public EXAMPLE1: string = "N";
@Input() public EXAMPLE2: string = "N";
当尝试服务或构建 JIT 时,它工作正常。但是当尝试 AOT 构建时,我得到了这个异常。
【问题讨论】:
-
显示您的
ExampleComponent代码和上面声明的字段。
标签: angular