I am trying to set innerHTML in a div but the directive used in the text is ignored. I am not sure if it is a invalid attribute(according to HTML) So below is my code:
<table class="table">
<tbody>
<tr>
<td>
<div [innerHTML]="issue.longText"></div>
</td>
</tr>
</tbody>
</table>
the value of issue.longText in component.ts is:
<ul><li>20/07/2018 - Hello!This is the test issue on click on it(<span [issueOpener]='{"recordId": 4, "page":1}'>link</span>)</li></ul>
And when I inspect the div I've got the following:
<ul><li>20/07/2018 - Hello!This is the test issue on click on it(<span>link</span>)</li></ul>
Directive issueOpener is removed from the span. So how can I prevent this directive? Any help would be greatly appreciated.