With ng-bind-html-unsafe removed, how do I inject HTML?
I'm trying to use $sanitize provider and the ng-bind-htm-unsafe directive to allow my controller to inject HTML into a DIV.
However, I can't get it to work.
{{preview_data.preview.embed.html}}">
I discovered that it is because it was removed from AngularJS (thanks).
But without ng-bind-html-unsafe, I get this error:
http://errors.angularjs.org/undefined/$sce/unsafe
what is ng bind html unsafe ?
In AngularJS ng-bind-html directive is a secure way of binding content to an HTML element. When you are letting AngularJS write HTML in your application, you should check the HTML for dangerous code. By including the "angular-sanitize.
You can inject HTML with ng-bind-Html-unsafe remove by using $sanitize provider and the ng-bind-htm-unsafe directive to allow my controller to inject HTML into a DIV.
You can use the below-mentioned code it will help:-
<br>