Angular HTML binding

后端 未结 21 2700
暖寄归人
暖寄归人 2020-11-21 04:00

I am writing an Angular application and I have an HTML response I want to display.

How do I do that? If I simply use the binding syntax {{myVal}} it en

21条回答
  •  天涯浪人
    2020-11-21 04:57

    Please refer to other answers that are more up-to-date.

    This works for me:

    (Angular2, Alpha 33)

    According to another SO: Inserting HTML from server into DOM with angular2 (general DOM manipulation in Angular2), "inner-html" is equivalent to "ng-bind-html" in Angular 1.X

提交回复
热议问题