added choice alert button
This commit is contained in:
parent
425f30a8eb
commit
86efbce55e
@ -51,7 +51,6 @@ export class AlertService {
|
||||
text: 'Ok',
|
||||
role: 'ok',
|
||||
}
|
||||
|
||||
]
|
||||
});
|
||||
|
||||
@ -60,4 +59,28 @@ export class AlertService {
|
||||
const { role } = await alert.onDidDismiss();
|
||||
return role;
|
||||
}
|
||||
|
||||
|
||||
async presentAlertConfirm(header: any, message: any, button1: any, button2: any) {
|
||||
const alert = await this.alertController.create({
|
||||
header: header,
|
||||
message: message,
|
||||
buttons: [
|
||||
{
|
||||
text: button1,
|
||||
role: button1,
|
||||
},{
|
||||
text: button2,
|
||||
role: button2
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
await alert.present();
|
||||
|
||||
const { role } = await alert.onDidDismiss();
|
||||
return role;
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user