popover icon indicating copy to clipboard operation
popover copied to clipboard

About programmatically, can you provide a complete demo

Open Sir0xb opened this issue 2 years ago • 0 comments

Proposal:

I need to do something before the popover, so I try to programmatically control logic.

But, I got "ERROR TypeError: this.popover.togglePopover is not a function".

<button
	[mdePopoverTriggerFor]="appPopover"
	mdePopoverTriggerOn="none"
	(click)="test()"
>
<mde-popover #appPopover="mdePopover">
	...
</mde-popover>
@ViewChildren(MdePopoverTrigger) popover: MdePopoverTrigger;

public test() {
	this.popover.togglePopover();
	console.log('do something', this.popover);
}

Sir0xb avatar May 31 '22 14:05 Sir0xb