I have a div in a template that has #divMessages as a template reference name.
<div #divMessages></div>
When some events occur, I want to append HTML tags to this div. I tried in the following way but HTML tags appended as a string.
this.divMessages.nativeElement.append('<li>'+data.message+ '</li>');
My current method considers HTML tags as a string. How I can append HTML tags, to hide the tags and show only the data. (means only list items are shown and the tags are hidden in the above case).