I am using this method to remove a component ViewContainerRef.remove(index: number)
however, with this way, I need to work out the component index. My question is:
If I use ViewContainerRef.remove
to remove a component, what is the best way to find the component index?
Any alternative ways for removing components?