My code now:
//it works only if u press the button
.html
<ion-button (click)="presentPopover($event)" >Share List</ion-button>
.ts
async presentPopover(ev: any) {
const popover = await this.popoverController.create({
component: PopovercomponentPage,
cssClass: 'popoverclass',
event: ev,
translucent: true
});
await popover.present();
const { role } = await popover.onDidDismiss();
console.log('onDidDismiss resolved with role', role);
}
1 post - 1 participant