title: Add event binding to dynamically created components
body: <p>I'm dynamically creating components inside <code>app.component.ts</code> using the <code>ViewContainerRef.createComponent()</code> method, which returns a <code>ComponentRef</code> object.</p>
  
  <pre><code>let newComponent:ComponentRef&lt;any&gt; = this.filtersSection.createComponent(MyDateRangeComponent);
  </code></pre>
  
  <p>I need to dynamically add an event listener to this component so it listens to the <code>onDateRangeChange</code> event and executes the <code>dateRangeChanged(event)</code> method defined inside the <code>app.component.ts</code> component.</p>
  
  <p>I originally used this component this way inside the app.component.html:</p>
  
  <pre><code>&lt;my-daterange (onDateRangeChange)="dateRangeChanged($event)"&gt;&lt;/my-daterange&gt;
  </code></pre>
  
  <p>I've found that this could be achieved using the <code>Renderer</code> class but I couldn't make this working:</p>
  
  <pre><code>this.renderer.listen(newComponent, 'click', (event) =&gt; {
      // Do something with 'event'
      console.log(event);
  });
  </code></pre>
  
  <p>Any help with this would be really appreciated.</p>