How to detect async change to ng-content

后端 未结 2 358
孤城傲影
孤城傲影 2020-12-11 05:37

I made a component which uses the marked package to render markdown content, the thing is it doesn\'t re-render itself when an async event changes its n

2条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-11 05:54

    Adding an @Input() content; and using the component like

    
    

    would make this easier.

    Alternatively a MutationObserver should work well for this specific use case.

提交回复
热议问题