我有一个使用 ComponentFactoryResolver 动态创建的组件。
this.container.clear();
let factory = this.resolver.resolveComponentFactory(DynamicComponent);
this.componentRef = this.container.createComponent(factory);
template: '...<child-component [param1]="param1"></child-component>...';
问题在于DynamicComponent的模板有子组件和输入绑定。是否有办法在动态创建组件时向子组件传递参数?
问题在于DynamicComponent的模板有子组件和输入绑定。是否有办法在动态创建组件时向子组件传递参数?