Tuesday, 20 August 2013

How do you use $sce.trustAsHtml(string) to replicate ng-bind-html-unsafe in Angular 1.2+

How do you use $sce.trustAsHtml(string) to replicate ng-bind-html-unsafe
in Angular 1.2+

ng-bind-html-unsafe was removed in Angular 1.2
I'm trying to implement something where I need to use ng-bind-html-unsafe.
In the docs and on the github commit they say:
ng-bind-html provides ng-html-bind-unsafe like behavior (innerHTML's the
result without sanitization) when bound to the result of
$sce.trustAsHtml(string).
How do you do this?

No comments:

Post a Comment