ng-bind-html does not load image src

后端 未结 2 1739
长发绾君心
长发绾君心 2020-12-20 21:40

I have a simple presentation like this

2条回答
  •  一个人的身影
    2020-12-20 21:52

    Nenad answered a question like this recently. By invoking $sce.trustAsHtml($scope.html) you will be able to mark the HTML as valid so that ng-bind-html will accept it. Even when the img src is relative and would therefore otherwise be marked as invalid.

    You can find his post here

提交回复
热议问题