@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