1

I used ng-bind-html like this

<p ng-bind-html="{{content.content}}">
</p>

but it didn't appear. But when I inspect, they are there. How come? It's not css issue.

enter image description here

1 Answer 1

1

The ngBindHtml directive takes an expression and evaluates it. So you should not put it into {{ }}. Try this:

<p ng-bind-html="content.content"></p>

Curly braces are used for expression interpolation, so its result is not an expression any more. However ngBindHtml needs an expression, because it passes this expression to some sanitize services to clean up from unsafe content.

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

Comments

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.