title: Angular2 Destroy Current Component Completely
body: <p>I tried searching google and stackoverflow but could not find an answer. So my question is simple "How can i remove current component in angular 2, 4"</p>
  
  <p>example:</p>
  
  <pre><code>&lt;div (click)="remove($event)"&gt;Remove Current Component&lt;/div&gt;
  
  remove($event) {
      // this.destroy() ????
  }
  </code></pre>
  
  <p>Basically what i want is <code>ComponentRef</code> see this <a href="https://stackoverflow.com/a/37540287/1635676">answer</a> <code>ngOnDestroy()</code> which calls <code>this.cmpRef.destroy()</code> :</p>
  
  <pre><code>ngOnDestroy() {
     if(this.cmpRef) {
       this.cmpRef.destroy();
     }    
  }
  </code></pre>
  
  <p>But he is getting the <code>ComponentRef</code> due to dynamically creating the component.</p>