Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70434

How to grab emit event of component via ion-popover in ionic5

$
0
0

@shreyasooksamlabs wrote:

How to get data back when the component connected with ion-popover emit some data .
Any method of grabbing emit event.As all other methods are connected with ion-popover I have used this component as both as selector and popover.
For example,
selectedOption(option_selected) {
console.log(“option_selected----”,option_selected)
this.option_selected.emit(option_selected)

this.popoverController.dismiss(option_selected)//Can't be used for both component and popover

}
async presentPopover(ev: any) {
var self = this;
const popover = await this.popoverController.create({
component: OptionOnMenuComponent,
componentProps: {
title: this.title
},
event: ev,
translucent: true
});
popover.onDidDismiss().then((data) => {
console.log(“data after popover is dismissd”, data[“data”])
self.tab_selected = data[‘data’]
})
return await popover.present();
}

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70434

Trending Articles



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