title: How to append HTML tags or elements to a div in Angular 6?
body: <p>I have a div in a template that has #divMessages as a template reference name. </p>
  
  <pre><code>&lt;div  #divMessages&gt;&lt;/div&gt;
  </code></pre>
  
  <p>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.</p>
  
  <pre><code>this.divMessages.nativeElement.append('&lt;li&gt;'+data.message+ '&lt;/li&gt;');
  </code></pre>
  
  <p>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).</p>