I am wondering how I can remove my component form DOM manually? I've been looking at ElementRef
, and found some work arounds there, but I've been wondering if there is any function dedicated to do this?
My set up is the following:
I've got a Loader
component, that is called via EventEmitter. I am adding it to a view by DynamicComponentLoader.loadNextToLocation(..)
, and then I want to remove it from the view.
I've also found Renderer.destroyView(component)
, but this yields me to errors.
Thanks