title: Passing data from child to parent in dynamic component
body: <p>I have been following the tutorial on dynamic components in Angular and have a solution working but I cannot seem to find how to pass data from the child to the parent.</p>
  <p>In this live example (<a href="https://stackblitz.com/edit/angular-yu5lxk?file=src/app/ad-banner.component.ts" rel="nofollow noreferrer">StackBlitz</a>), I'd like to be able to click the button in the child component (<code>HeroProfileComponent</code>) and receive it in the parent component (<code>AdBannerComponent</code>).</p>
  <p>How can I accomplish this and is it a sign of an anti-pattern?</p>