I have a HTML string like
<span class="diff-html-changed" id="1" changes="MyText" >test </span>
and I want to display the text as html. I include it like
displayedContentInTemplate: SafeHtml;
private sanitized: DomSanitizer,
....
displayedContentInTemplate = this.sanitized.bypassSecurityTrustHtml(contentAsString);
My problem is that the content of changes is not displayed. Therefore I thought to rename changes into title. This would display MyText when hovering the text.
How to change the attribute changes properly? A simple replace within the string might replace text which will belongs to the displayed text. And with simple creation of a HTML document I have no clue how to change the attributes name.