this.platform.ready().then(() => {
this.platform.backButton.subscribeWithPriority(0, async () => {
if (this.router.url == “/login” || this.router.url == “/home” || this.router.url == “/starter”) {
let dataValue = await this.autocloseOverlaysService.trigger();
if (dataValue) {
}
else {
this.showAlert();
}
}
else if (this.routerOutlet.canGoBack()) {
let dataValue = await this.autocloseOverlaysService.trigger();
if (dataValue) {
}
else {
this.navCtrl.back();
}
}
});
});
}