Skip to content

How to remove Angular Elements from the DOM #48297

@EzioArqam

Description

@EzioArqam

Which @angular/* package(s) are relevant/related to the feature request?

elements

Description

Hello,
I am relatively new to the concept of Angular Elements and I am implementing an Angular Web Component in a webforms project.
The problem is I have to inject this component on the landing page and I want to remove this from the DOM when I navigate to specific workflows in the page. Is there any custom method that I need to implement in the parent framework which will allow me to delete the angular element from DOM or do I need to call an element while creating the custom element?
Please Help

Proposed solution

I really dont have any proposed solution

Alternatives considered

I can remove it from the DOM using native element.remove but is there any cleaner way to do this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions