Ion-side-menus based app navigation woes


#1

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:

  1. Tap nav-icon in upper left to to to Menu from Home view (a list of items)
  2. Menu opens from left
  3. Tap Settings
  4. Settings view opens (with nav-icon), menu closes
  5. Tap nav-icon to bring up menu
  6. Tap Home
  7. 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:

  1. open app, to /login (ion-view with no nav bar)
  2. add credentials, pass login
  3. $state.go(app.home) view
  4. At this point The Home list view shows, and the problem sequence above can be started.