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

Labels

P4A relatively minor issue that is not relevant to core functionsarea: cdk/portalfeatureLabel used to distinguish feature request from other issues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions