Is it possible to create an HTML fragment in an AngularJS controller and have this HTML shown in the view?
This comes from a requirement to turn an
ng-bind-html-unsafe no longer works.
ng-bind-html-unsafe
This is the shortest way:
Create a filter:
myApp.filter('unsafe', function($sce) { return $sce.trustAsHtml; });
And in your view:
P.S. This method doesn't require you to include the ngSanitize module.
ngSanitize