Skip to content

PortalOutlet using existing component instance as the host #14659

Open
@habibialkaff

Description

@habibialkaff

Please describe the feature you would like to request.

PortalOutlet where the "outletElement" is an instance of an existing component

What is the use-case or motivation for this proposal?

I'm using Portal to render an overlay on top of an existing component (host component).

Is there anything else we should know?

Currently the way I do it is to have the host component injects the ElementRef so that I can get the nativeElement which I can use it as the outletElement when instantiating the DOMPortalOutlet.

I wish CDK provides a way where I don't need to explicitly injects ElementRef just so that I can get access to the host Element

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4A relatively minor issue that is not relevant to core functionsarea: cdk/portalfeatureThis issue represents a new feature or feature request rather than a bug or bug fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions