I’m developing an ionic app with a settings page. This settings page can be accessed from:
-Login page when the user is not logged (login.index state).
-Side menu when the user is logged (site.xxx state, the site menu is defined in the ‘site’ state).
If the user accesses the settings page from the login page, he should see a back button to go back to login. If the user accesses it from side menu, he should see the side menu icon.
I tried to implement it using two different states: login.settings and site.settings. The problem is that with this solution I cannot create child elements from settings, since I don’t know if the state root is ‘login’ or ‘site’.
So now I’m trying to show the side menu icon or the back button depending on a scope variable called showBackButton, but I can’t make it work. I tried using
but the side menu icon doesn’t disappear.
Anybody knows the easiest way to implement this behaviour?