How to raise event for buttons which are created dynamically in DCL.loadintolocation()?
<p>Hi i am trying to load a component using DCL loadintolocation().The component is loading perfectly but i want to raise an event from the buttons that are created dynamically.I made a demo here <a href="http://plnkr.co/edit/PFOFyd9XN5xMzwK9q0fP?p=preview" rel="nofollow">http://plnkr.co/edit/PFOFyd9XN5xMzwK9q0fP?p=preview</a>  > I want to raise the event for button with name "destroy". Somebody please help me how to bind the event for buttons that are created dynamically.</p>

<pre><code>add(){
this.renderTemplate(`
  &lt;div id="evnt"&gt;
  &lt;button (click)="raiseevent()"&gt;Destroy&lt;/button&gt;
    &lt;some-component&gt;&lt;/some-component&gt;
  &lt;/div&gt;
`, [SomeComponent]);
</code></pre>

<p>}</p>

<pre><code>raiseevent(){
alert('hi');
</code></pre>

<p>}</p>