I have a component with encapsulation
set to ViewEncapsulation.None
and a property named question which contains text from server call, which might contain HTML tags like
<strong>Main Question</strong> and some more text
in my view I use the property like this
...
<p [innerHTML]="question"></p>
...
and the produced HTML is
<p>
<strong>Main Question</strong> and some more text
</p>
but the thing is that strong tag apart from the semantics should also make the text bold, which doesn't happen.
1) Why this happens and browser does not render it correctly? 2) which is the correct way to fix it?
I know there are similar questions but they couldn't help.
Angular Version Used: Angular 2.4.7