We have Ionic app with following structure:
Home screen -> Side menu, Content with list of users
Detail screen -> Back button, Content with user details + Link to another detail
The problem is that if you enter Detail screen and from that you tap a Link to another random detail, behavior of back button is changing. When you first enter Detail screen, Back button leads to home screen. But if you go from Detail page to another Detail page, Back button leads to the previous detail.
It possible to make Back button always leading to the home?
Another problem is, that the side menu is not being show on the Detail screen.
Solution would also be to have there that menu.
Home template
<ion-view>
<ion-nav-buttons side="left">
<button menu-toggle="left" class="button button-icon icon ion-navicon"></button>
</ion-nav-buttons>
<ion-content>
<!-- list of users -->
</ion-content>
</ion-view>
Menu template:
<ion-side-menus>
<ion-side-menu-content>
<ion-nav-bar class="bar-light nav-title-slide-ios7">
<ion-nav-back-button class="button-clear"><i class="icon ion-chevron-left"></i> Back
</ion-nav-back-button>
</ion-nav-bar>
<ion-nav-view name="menuContent" animation="slide-left-right">
</ion-nav-view>
</ion-side-menu-content>
<ion-side-menu side="left">
<header class="bar bar-header bar-light">
<!-- logo -->
</header>
<ion-content class="has-header bg-white">
<!-- menu items -->
</ion-content>
</ion-side-menu>
</ion-side-menus>
Detail template
<ion-view>
<ion-nav-buttons side="right">
<button class="button">Next random</button>
</ion-nav-buttons>
<ion-content>
<!-- user detils -->
</ion-content>
</ion-view>