title: Angular 4: Click event in [innerHTML]
body: <p>After much searching I am trying to find a simple way to execute a method when clicking a link in dynamically created HTML that is being saved in a database. I'm creating messages to users about transactions that have various links embedded in the message body. I need to save the message on the database and when retrieved and viewed, the user should be able to click a link to call a method which will route them to the proper page. </p>
  
  <p>The HTML looks something like this:</p>
  
  <pre><code>"string myHTML='&lt;div&gt;&lt;a (click)=method1(tranID)&gt;Execute Method 1&gt;&lt;/a&gt;&lt;div&gt;
  &lt;br&gt;&lt;br&gt;
  &lt;div&gt;&lt;a (click)=method2(tranID)&gt;Execute Method 2&gt;&lt;/a&gt;&lt;div&gt;'
  </code></pre>
  
  <p>In my HTML file I have: </p>
  
  <pre><code> &lt;div [innerHTML]="myHtml"&gt;&lt;/div
  </code></pre>
  
  <p>I understand that this is by design in Angular but there has to be a reasonably straightforward way to do this. I am not an Angular expert and need some help! Thanks</p>