Angular 2 equivalent of ng-bind-html, $sce.trustAsHTML(), and $compile?

前端 未结 6 920
暖寄归人
暖寄归人 2020-11-30 09:46

In Angular 1.x, we could insert HTML in real-time by using the HTML tag ng-bind-html, combined with the JavaScript call $sce.trustAsHTML(). This go

6条回答
  •  执念已碎
    2020-11-30 10:26

    Have a look at this module https://www.npmjs.com/package/ngx-dynamic-template

    After a long research, only this thing helped me. The rest of the solutions seems to be outdated.

提交回复
热议问题