In my Ionic app, specifically when testing via ionic serve in Chrome, I'm seeing an odd behavior while navigating with ion-tabs. If I load the page as the root route (http://localhost:8100/#), navigation and state works fine. I can click on any of my tabs at the bottom of the page (iOS view) and get expected behavior.
Now instead, if I load the URL of one of the nested views, and I click on the tab to go back to that parent view, only the child view I entered on is shown.
Example (borrowed from Ionic's nightly pen): http://codepen.io/ionic/pen/odqCz#/tab/facts2
When entering the above codepen without the #/tab/facts2, navigation happens as expected - I can click the 'Scientific Facts' button, navigate down a few children, then click the 'Home' icon and go back to the root.
When entering at the second URL, I'm taken right to the facts2 page, as I expect. However, clicking the 'Home' icon always takes me back to facts2.
<ion-tab title="Home" icon="ion-home" href="#/tab/home"> <ion-nav-view name="home-tab"></ion-nav-view> </ion-tab> Interestingly, if I use the 'home' button on the facts2 page, it does correctly navigate to Home, but the nav icon will not work.
<a class="button icon ion-home" href="#/tab/home"> Home</a> Is there something I'm not understanding about how the ui-router / state changing works, or is this a bug? My main concern is that when this app is compiled and deployed, and a user leaves the program in one of the child states, then re-opens, the navigation bar will break.