I’m learning Ionic and Angular. Currently woking on a todo list app. I created a updateTask button. When I click on the button, alert.present is not a funktion? Am I missing something?
constructor(public navCtrl: NavController, public alertCtrl: AlertController) {
}
async updateTask(index) {
let alert = this.alertCtrl.create({
title: 'Update Task',
message: 'type to update',
inputs: [{name: 'editTask', placeholder: 'Task'}],
buttons:[{text: "Cancel", role: 'cancel'},
{text: "Update", handler: data => {
this.taskList[index] = data.editTask;
}
}
]
});
await alert.present();
}