I am trying to render some unsafe HTML (basically a HTML snippet with some inline styling) and have the following code in my view:
The ng-bind-html-escape
was removed in AngularJs 1.2.
To achieve the same effect I would advise you to create a filter to trust the resource (you should include the $sce module ):
app.filter('unsafe', function($sce) {
return function(val) {
return $sce.trustAsHtml(val);
}; });
Usage:
<ELEMENT ng-bind-html="htmlValue | unsafe"></ELEMENT>
You shouldn't forget to include the ngSanitize as the app dependency:
angular.module('app', ['ngSanitize'])
Cheers.
You can bypass it using $sce.trustAsHtml
. See documentation
self.snippet.content = $sce.trustAsHtml('some html');