I am have a variable which fetches a string from my database and displays it on one of my panels. The text which is fetched contains typical HTML tags such as <b><u><p>
etc.
<div [innerHTML]="myVariableWithTags"></div>
This would work when tested with ionic lab
but will not run on emulators or real devices.
So my question is what is an alternative of innerHTML for Ionic?
For example my variable myVariableWithTags
is the following:
<b>This has to be bold</b> <i>and this italic</i>
I want to do the following:
<div> {{myVariableWithTags}} </div>
and would like to see the panel look like this: This has to be bold and this italic
instead of <b>This has to be bold</b> <i>and this italic</i>
Is this possible?