angular 4+ assign @Input for ngComponentOutlet dynamically created component

前端 未结 3 1749
渐次进展
渐次进展 2020-11-30 05:54

In Angular 4 to dynamically create a component you can use ngComponentOutlet directive: https://angular.io/docs/ts/latest/api/common/index/NgComponentOutlet-dir

3条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-30 06:37

    I think for now you can use

    https://www.npmjs.com/package/ng-dynamic-component

    It is made specifically for this issue

提交回复
热议问题