title: In Angular ng-bootstrap modal with template, close and dismiss buttons not working
body: <p>I am new to angular and I am learning by building.</p>
  
  <p>I have a requirement to open a modal programmatically with varying HTML Content.</p>
  
  <p>I have referred the first stackblitz <a href="https://stackblitz.com/edit/angular-v6amvy-pttrng?file=app/app.component.html" rel="nofollow noreferrer">example</a> illustrated in this <a href="https://github.com/ng-bootstrap/ng-bootstrap/issues/2476" rel="nofollow noreferrer">issue</a> and created a ModalComponent (with selector called <code>&lt;app-modal&gt;</code>), so that I can create modals anywhere in my app.</p>
  
  <p>Now, I use this component  with varying html content in a <code>&lt;ng-template&gt;</code> in my page. </p>
  
  <p>The modal opens fine on clicking the button in the main page, but the close and dismiss buttons in the modal do not work. </p>
  
  <p>I have tried to make a minimal example here : <a href="https://stackblitz.com/edit/angular-j1u4fo" rel="nofollow noreferrer">https://stackblitz.com/edit/angular-j1u4fo</a></p>
  
  <p>Any help will be appreciated. Thanks.</p>