Skip to content

feat(PORTAL): allow user to provide bindings for a ComponentPortal #32757

@spike-rabbit

Description

@spike-rabbit

Feature Description

This is basically reopening #717, but with the new binding feature of Angular I believe this would now be a very useful extension.

I would like to have the possibility to do this:

const toolTipPortal = new ComponentPortal(TooltipComponent, { 
  bindings: [inputBinding('value', value)],
  ...
});

I would love to provide a PR if you confirm that this feature has a chance of being accepted.

Use Case

In my case, I am building a tooltip directive.
The directive has an input() and this input is forwarded into a component which is shown in an overlay.
Currently I am using an InjectionToken.

Being able to use bindings would simplify the code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureThis issue represents a new feature or feature request rather than a bug or bug fixneeds triageThis issue needs to be triaged by the team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions