我在创建Angular Elements的Angular9中的VSCode(1.44.0-insider)中收到一个奇怪的警告:
export class AppModule {
constructor(private injector: Injector) {
const helloElement = createCustomElement(HelloComponent, {injector});
customElements.define('my-hello', helloElement);
}
ngDoBootstrap() {}
}
helloElement
来自typescript的错误消息不接受的类型:
类型“ NgElementConstructor”的参数不能分配给“ CustomElementConstructor”类型的参数