我通过以下方式创建动态组件
<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调用中使用什么索引,我总是总是将新组件放在第一位。我在做什么错了?