popover
popover copied to clipboard
Allow passing of data to popover
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
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.
Use ComponentPortal instead of TemplatePortal, you have to do a little work