title: Compile angular 2 html from string
body: <p>Lets say I have this string in database.</p>
  
  <pre><code>databaseEntry = "&lt;span (click)="togleShowDetails()"&gt;click here&lt;/span&gt;"
  </code></pre>
  
  <p>I want it to work the same as if I put the same string directly into my code.
  I tried this:</p>
  
  <pre><code>&lt;p [innerHTML]="databaseEntry"&gt;&lt;/p&gt;
  &lt;span (click)="someFunction()"&gt;click here&lt;/span&gt;
  </code></pre>
  
  <p>Both lines render visually the same but click function works only on second because in fact the generated HTML is different. </p>
  
  <pre><code>&lt;span&gt;click here&lt;/span&gt;
  &lt;span _ngcontent-qdv-71="" data-vivaldi-spatnav-clickable="1"&gt;click here&lt;/span&gt;
  </code></pre>
  
  <p>It is because the first one isn't regenerated by angular.</p>
  
  <p>So the question is what to use instead of innerHTML.
  I found some answers for this but none was considering random input string or lacked something crucial.</p>