How to Close the Alertcontroller with device Back Button?
invalid() {
let alert = this.alertCtrl.create({
title: 'Error',
subTitle: 'Field is Missing!',
buttons: [{
text: 'Cancel',
handler: data => {
console.log('Cancel clicked');
}
},
{
text: 'Try Again',
handler: () => {
console.log('Try Again Clicked!');
}
}]
});
alert.present();
}