title: how to use destroy() method of class ComponentRef<C>
body: <p>I'm trying to destroy a component using <strong>ComponentRef class</strong> by injecting it to the constructor as <strong>private compRef : ComponentRef</strong></p>
  
  <p><em>It is giving Error: Uncaught (in promise): Error: No provider for ComponentRef!</em></p>
  
  <p>Tried including ComponentRef in the providers array at component level and app.module, but it says type ComponentRef is not assignable to type 'Providers'.</p>
  
  <p>Any help about how to implement ComponentRef to be able to use destroy() method?</p>
  
  <p>Thank you.</p>