title: How to remove component dynamically in Angular2?
body: <p>I am using this method to remove a component <code>ViewContainerRef.remove(index: number)</code> however, with this way, I need to work out the component index. My question is:</p>
  
  <p>If I use <code>ViewContainerRef.remove</code> to remove a component, what is the best way to find the component index?</p>
  
  <p>Any alternative ways for removing components?</p>