类型“ Component”的参数不能分配给类型“ Type <{}>”的参数

时间:2020-02-13 07:09:54

标签: angular angular-dynamic-components

 loadComponentTest() {
    for (let i = 0; i < this.listTemplates.length; i++) {
      const factory = this.resolver.resolveComponentFactory(this.listTemplates[i].Component);
      this.componentRef = this.entry.createComponent(factory);
    }
  }

在这里使用resolveComponentFactory()方法时,我正在传递Type Component的componet项,但出现错误。

0 个答案:

没有答案