title: Angular 2 - Stripping out click function when using [innerHTML]
body: <p>I have to enter some html via typescript using the [innerHTML] tag on the template.</p>
  
  <p>I am trying to put a click function on the html:</p>
  
  <pre><code>status = "&lt;img src='assets/hello.png' (click)='hello()' /&gt;";
  </code></pre>
  
  <p>But the click function gets stripped away with the console saying:</p>
  
  <pre><code>WARNING: sanitizing HTML stripped some content (see http://g.co/ng/security#xss).
  </code></pre>
  
  <p>I see a few people have mentioned using "DomSanitizer" but can't find an example which fixes my exact problem.</p>