Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 48986

Open a popover by long pressing the button

$
0
0

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

Read full topic


Viewing all articles
Browse latest Browse all 48986

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>