I have created a webcomponent using angularElements createElement. I am using this webcomponent in different angular application.
Whenever user moves to the view which has webcomponent an instance of the webomponent is created. But when user moves in and out of the view multiple times. Multiple instances of webcomponent is getting created. and the element is available in detachedNode.
This is creating unexpected behaviour such as apis are getting triggered multiple times equal to the count of the detached elements.
Is there any way we can remove/kill the instance of the webcomponent or any way to deregister custom elements.
Any help will be highly appreciated. Thanks