Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70612

How to render raw html correctly?

$
0
0

@zhouhao wrote:

I'm using ngSanitize to render raw html in my angular project. For example:

<p ng-bind-html='article.body'>

I'm using console.log to print the contents of my article.body, it's:

<p><img alt="" src="http://mydomain.com/img/124417660.jpg" style="height:500px; width:300px;" /></p>

But the result of my page is:

<p><img alt="" src="http://mydomain.com/img/124417660.jpg" /></p>

The style was removed. How does ng-bind-html work? Why it remove my style? Any suggestion for this? Thanks.

Posts: 4

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 70612

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>