I'm trying to understand the issue with my code for a day without success. So I would ask for help. I'm trying to use ng-bind-html-unsafe in a template. I'm new to Angular so probably I'm missing something simple. Just to be clear: I did read all related questions / answers first but still stuck. Here is the code: http://plnkr.co/edit/AcBeML?p=preview
1 Answer
Since angular 1.2.x you just have to use ng-bind-html
So :
ng-bind-html="item.text"
Working plunker : http://plnkr.co/edit/CLet6FdaxVE9aDKMrqP7?p=preview
2 Comments
Poyraz Yilmaz
@antgraf you should use $sce for unsafe html... maybe ng-bind-html is not enough for you...
antgraf
@wickY26 looks like proposed solution works for me. But as I've said I'm newb so probably I'm missing something. Could you please explain briefly when I need more complex approach with $sce? It is hard to get it from documentation. Thank you.