Platform back button not working

hi friends,
help me on this

this.platform.backButton.subscribe(async(event)=>{
     alert('lll');
  });

Hi, Please try given code. May it will be working…
constructor(public platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen,public alertCtrl:AlertController) {
platform.ready().then(() => {
// Okay, so the platform is ready and our plugins are available.
// Here you can do any higher level native things you might need.
statusBar.styleDefault();
splashScreen.hide();
platform.registerBackButtonAction(() => {
if (this.alertShown==false) {
this.presentConfirm();
}
}, 0)
});
}
presentConfirm() {
let alert = this.alertCtrl.create({
title: ‘STUDENT PORTAL’,
message: ‘Do you want Exit?’,
buttons: [
{
text: ‘Cancel’,
role: ‘cancel’,
handler: () => {
console.log(‘Cancel clicked’);
this.alertShown=false;
}
},
{
text: ‘Yes’,
handler: () => {
console.log(‘Yes clicked’);
this.platform.exitApp();
}
}
]
});
alert.present().then(()=>{
this.alertShown=true;
});
}
}

Note: This is i have used in app.component.ts file…Thank you…