I'm trying to upload a file only if the user clicks on 'Yes', it is not calling the method but
new to ionic so I'm not sure if this is right way to call a method in Alert.
async presentAlertConfirm() {
const alert = await this.alertController.create({
header: 'Upload Documents',
subHeader: 'Do you want to Upload Documents?',
mode: 'ios',
backdropDismiss: false,
buttons: [
{
text: 'NO',
role: 'cancel',
cssClass: 'secondary',
handler: (blah) => {
console.log('Confirm Cancel: blah');
}
}, {
text: 'YES',
handler: () => {
console.log('Confirm Yes, yipe')
// this.changeListener
this.addImageLan;
// const el: HTMLElement = document.getElementById('test');
// el.click();
}
}
]
});
await alert.present();
}
Any help will be useful
replace
this.addImageLan;
with
this.addImageLan();