Dynamically adding components in ngFor

后端 未结 4 923
感情败类
感情败类 2020-12-08 11:33

I have a \"dashboard\" that loads configured elements. Dashboard template has this:

  
4条回答
  •  春和景丽
    2020-12-08 11:54

    I resolved the issue by adding 'static: false'.

    @ViewChild(conf.id, {read: ViewContainerRef, static: false}) var widgetTarget: ViewContainerRef

    https://stackoverflow.com/a/41095677/6329980

提交回复
热议问题