0

我正在通过以下方式创建动态组件

<div #newComponents></div>

addCategory = (categoryName: string) => {
const formRowFactory = this.resolver.resolveComponentFactory(FormRowComponent);
const { instance: formRowComponent } = this.newComponents.createComponent(
  formRowFactory, // playing with the index over here
);
}

无论我在 createComponent 调用中使用什么索引,我总是将新组件放在首位。我究竟做错了什么?

4

0 回答 0