My app is closely based on the sidemenu example. Login is handled differently, but everything else is very close with some additional parts on one view like a refresher and slide menu on list items, etc.
I need some help understanding what is causing the behavior, and some ideas on how to resolve it. Is this a matter of $state and parent/child relationships that I’m not following? If so, is there a way to command the nav bar functionality to act the way I want with the slightly different structure? Should I not be using state.go to transition from the login state?
I’ve tried a few things, but nothing has corrected it, and some have made things worse. If the ion-side-menus directives are not meant to accomplish this, let me know and I’ll start looking at a more manual solution than this packaged set of ionic functionality.
First, the problematic symptom:
- Tap nav-icon in upper left to to to Menu from Home view (a list of items)
- Menu opens from left
- Tap Settings
- Settings view opens (with nav-icon), menu closes
- Tap nav-icon to bring up menu
- Tap Home
- Menu closes, Home View slides in from the right changing the nav-icon to a Back chevron which goes back to Settings (its as though the Home view were a detail view from a list item)
What I want to happen is exactly the opposite. If I tap on Settings in the menu, that view opens with a back button to Home. Home is my primary View, not Settings. I do realize this is not exactly the same as the sidemenu example - and I’d be willing to just have my app do that as something “better” than what it does now.
The things that are different from the sidemenu starter app:
We have a default route that is /login. It is an ion-view, but is not part of the app abstract state. The sequence for the app is:
- open app, to /login (ion-view with no nav bar)
- add credentials, pass login
- $state.go(app.home) view
- At this point The Home list view shows, and the problem sequence above can be started.