I have managed to open an alert with in an alert. But when I choose Admin I want to close the first alert after the user chooses Admin.
How can I do that?
showAlert2(message)
{
let alert = this.alertCtrl.create({
title:'Sign in as',
inputs: [
{
type:'checkbox',
label:'Admin',
value:'admin',
handler: data => {
this.showAlert3('Sign in');
}
},
{
type:'checkbox',
label:'Patient',
value:'patient'
}
],
buttons: [
{
text: 'Login',
handler: data => {
// if the user chooses patient open a page
this.navCtrl.push(PMainPage);
// if the user chooses admin i want to create an other alert message
}
}
]
});
alert.present();
}
Thank you in advance!