通过 ViewContainerRef.createComponent 创建动态 import 的 Component 即可
export class AppComponent {
constructor(private viewContainerRef: ViewContainerRef)
{ }
async show() {
this.viewContainerRef.createComponent(
(await import('../my-component/my-component.component')).MyComponentComponent
)
}
}