ng-bind-html removing style

Asked

Viewed 106 times

0

I’m trying to pass a style in a span, more when I use ng-Bing-html it pulls out

In the json that is placed on the page until this with the style

<script id="data" type="application/json" product-data>
<p><span style=\"color: #ff0000;\">PEDIDO M&Iacute;NIMO:&nbsp;10 UNIDADES&nbsp;<\/span><\/p>

More when I use

        <div itemprop="description" ng-bind-html="product.summary"></div>

Result on the page

<p><span>PEDIDO MÍNIMO:&nbsp;10 UNIDADES&nbsp;</span></p>

1 answer

1


Try to use the $sce.trustAsHtml() in the controller, not to lose CSS.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.