i am new to ionic framework. Below code i have used in app.component.ts in constructor. My scenario is i have 3 screens A, B and C. A(HomeScreen) button click takes to B and B takes to C screen but when i press hardware back button it directly navigates to A screen. I am not getting how to bring back in sequence.
if(this.platform.is("android")) {
this.platform.backButton.subscribe(() => {
if(this.router.url== '/tabs/home') {
navigator['app'].exitApp();
}
})
}
Thanks in advance