I\'m trying to use $sanitize provider and the ng-bind-htm-unsafe directive to allow my controller to inject HTML into a DIV.
$sanitize
ng-bind-htm-unsafe
However, I can
For me, the simplest and most flexible solution is:
And add function to your controller:
$scope.to_trusted = function(html_code) { return $sce.trustAsHtml(html_code); }
Don't forget add $sce to your controller's initialization.
$sce