I wanna get each input box's string data.
What should i do? Base language is typescript.
I'm trying to put WIFI information in input box and want to handle it. For example, if i type "test" and press 'ok', I wanna save it in variable. Help pls. Tnx
async presentAlert() {
const alert = await this.alertController.create({
header: 'Input wifi information',
buttons: [
{
text: 'Ok',
handler: (alertData) => {
this.data = alertData.ssid+","+alertData.pw+","+alertData.email;
this.wifiName=alertData.ssid;
this.wifiPassword=alertData.pw;
this.email=alertData.email;
}
}
]
You can handle the data like this example:
const alert = await this.alertController.create({
inputs: [
{
name: 'name',
type: 'text'
}],
buttons: [
{
text: 'Ok',
handler: (data) => {
console.log(data);
}
}
]
});
await alert.present();
You can check this old version from here.