I want to bind a HTML string with an custom style to the DOM. However ngSanitize
removes the style from the string.
For example:
In the controller:
$scope.htmlString = "<span style='color: #89a000'>123</span>!";
And in DOM:
<div data-ng-bind-html="htmlString"></div>
Will omit the style attribute. The result will look like:
<div data-ng-bind-html="htmlString"><span>123</span>!</div>
Instead of:
<div data-ng-bind-html="htmlString"><span style='color: #89a000'>123</span>!</div>
Question: How can I achieve this?