0

I'm trying to load dynamic elements inside this paragraph text on button click

<p[innerHTML]>{{ result}}</p>

This is a text that i am sending rom my php application

<span class="red">This</span><span class="green">is</span><span class="blue">dynamic</span><span class="red">text</span>

i want to convert this html entities also on my angular component and css should also work right now these html entites and class are not working. It is printing as it is.

Thanks

1 Answer 1

1

Try it:

<p [innerHtml]="result"></p>
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.