The problem is caused when you try to apply a text bind in html mode, that is, ng-bind-html
without using the module ngSanitize
, which is responsible for 'lapid', let's say that text for the same is displayed.
There are some "fixes" that you create a policy to circumvent this error so that you apply bind
to "unsafe" mode. But the most correct way would be to initialize the module ngSanitize
of the Angular itself in your application. It is a common initialization like any other module.
//Inclua o script como achar melhor, ex.:
<script src="//ajax.googleapis.com/ajax/libs/angularjs/X.Y.Z/angular-sanitize.js"></script>
and in your module boot:
angular.module('app', [
//Seus outros módulos aqui
'ngSanitize'
]);
Edited
As these options (and our conversation in the comments) did not solve the problem - which is quite strange - this would be the alternative fix I mentioned:
angular.module('gaxApp')
.filter('trust_html', ['$sce', function($sce){
return function(text) {
return $sce.trustAsHtml(text);
};
}]);
Being used like this:
ng-bind-html="seucampo | trust_html"