@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