async presentAlertPrompt() {
const alert = await this.alertController.create({
header: 'Add App',
inputs: [
{
name: 'name1',
type: 'text',
placeholder: 'Name'
},
{
name: 'name2',
type: 'text',
id: 'name2-id',
placeholder: 'Description'
},
// input date with min & max
{
name: 'name4',
type: 'date',
min: '2017-03-01',
max: '2018-01-12'
},
// input date without min nor max
],
buttons: [
{
text: 'Cancel',
role: 'cancel',
cssClass: 'secondary',
handler: () => {
console.log('Confirm Cancel');
}
}, {
text: 'Add App',
handler: () => {
console.log('Confirm Ok');
}
}
]
});
await alert.present();
let result = await alert.onDidDismiss();
console.log(result);
}