So I'm trying to get input from an AlertController, and I'm not sure how to do that in Typescript.
ionViewDidLoad(){
// Presenting popup
this.alert.create({
title:'Enter Details',
inputs:[{
//phNo:'Enter Mob No. E.g.919090998302',
//placeholder: 'pNo',
name:'username',
placeholder: 'username'
},{
name: 'number',
placeholder: 'PNo',
}],
buttons:[{
text: 'Continue',
handler: username =>{
if(typeof username!=null){
this.name = username,
this.phNo = number
}
}
}]
}).present();
I need to get the second input value as soon as I click the button, but I'm not sure how do I do that in this, in this it says Cannot find name "number".