2

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 1

1

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

Sign up to request clarification or add additional context in comments.

2 Comments

@antgraf you should use $sce for unsafe html... maybe ng-bind-html is not enough for you...
@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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.