I am using angular treeview directive to show treeview.
I am unable to render html.
for eg. B is showing as <b>B</b>
.
here is the fiddle fiddle
i have used ng-html-bind for html rendering many times, but its not working here.
I am using angular treeview directive to show treeview.
I am unable to render html.
for eg. B is showing as <b>B</b>
.
here is the fiddle fiddle
i have used ng-html-bind for html rendering many times, but its not working here.
As ng-bind-html-unsafe
has been deprecated now, you will need to use $sce.trustAsHtml. There is a nice article to understand what $sce is.
For quick reference you can also refer to stackoverflow question.
As it looks in treeview's code, by default you can't.
But you can modify it's code (example for minified version), change
<span data-ng-class="node.selected" data-ng-click="'+a+'.selectNodeLabel(node)">{{node.'+e+'}}</span>
to
<span data-ng-class="node.selected" data-ng-click="'+a+'.selectNodeLabel(node)" ng-bind-html-unsafe="node.'+e+'">
Don't forget to add ngSanitize module to your app: https://docs.angularjs.org/api/ngSanitize
Upd: Here is updated fiddle http://jsfiddle.net/vL4TJ/76/