ng-bind-html doesnt work for Input tags

后端 未结 3 1187
眼角桃花
眼角桃花 2020-12-11 01:23

I am trying to store a HTML inside a scope variable and then use it in template view. When I was reading how to do this in angular, I came across ng-bind-html.

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-11 02:18

    Angular selectively sanitizes certain HTML tags with ng-bind-html

    so if you want all the tags you should use ng-bind-html-unsafe instead

    but watch out of XSS attacks !

    BTW

    It's far better to follow the @Ed Hinchliffe piece of advice

提交回复
热议问题