popover icon indicating copy to clipboard operation
popover copied to clipboard

Allow passing of data to popover

Open Lolmewn opened this issue 4 years ago • 2 comments

Bug, feature request, or proposal:

In Angular Material, it is often possible to pass data (sometimes referred to as context) to elements (see e.g. https://material.angular.io/components/dialog/overview#sharing-data-with-the-dialog-component). It would be great if this was possible for this Popover module, too.

What is the use-case or motivation for changing an existing behaviour?

The main benefit of this is that you can re-use a Component or TemplateRef with dynamic data.

Which versions of Angular, Material-Extended, OS, TypeScript, browsers are affected?

Using Angular 10.0.4 with Material-Extended 3.0.3

Lolmewn avatar Aug 03 '20 13:08 Lolmewn

@Lolmewn

This is something I plan to do in the next version that I'm working on. But, the only issue is that the popover API will change a lot and rely on a service etc just like the dialog. It might mean that I have to keep both popover variations updated for a while until everyone has switched over to a newer cleaner API.

It's still a work in progress though and probably won't be finished for many months.

joejordanbrown avatar Aug 05 '20 15:08 joejordanbrown

Use ComponentPortal instead of TemplatePortal, you have to do a little work

netronx avatar Mar 29 '21 11:03 netronx