Ion-nav-bar missing after i click the tab

I post my problem on I have to click the tab vicemap first and click the mainmap tab to make the content show itself correctly. I have no idea why this happens. Any one can help?

who knows y? :sob:

I don’t know if it is a bug or i did the side menus or tabs wrong. Did I miss something there?

The issue here was that you used an ion-nav-bar, but not ion-nav-view after it.

The ion-nav-bar was expecting an nav-view to come afterwards and have a nested state. But in your original codepen, you would have been better to use an ion-header-bar instead.

1 Like

Thank you for the answer. It helps me a lot. I have updated the code to
But another thing happens. When i click the tab vicemap and then the tab mainmap, the ion-nav-bar disappears. It only shows the content of the ion-nav-view. :confounded:

Interestingly I had a similar situation in my app where sometimes my nav-bar (title bar) was disappearing completely. Just a blank rectangle at the top of my screen where the title bar/navbar (with the menu button and/or back button) should have been.

The root cause turned out to be that I had two (independent, unrelated) UI-router states in my app which I accidentally gave the same view name (using a state provider call). Then, when navigating from state 1 to state 2, Ionic/UI-router would get confused and “think” that it was coming back to the same page/view and didn’t have to re-display the title bar again.

At least that’s my interpretation of it.

To make a long story short, simply renaming one of the two views to a new and unique name solved the problem. Please double-check if this situation applies to your case as well. Maybe it helps.

To be honest the Ionic navigation system with its nested history features and automatic view caching is very powerful but I’ve had to do quite a bit of fussing and tweaking to get it working right and to make it do “what I want”.

(I’m building a fairly complicated app with both side menus and multiple tabbed pages with nested child views and so on, and I had a fair amount of problems with menu buttons and back buttons not showing up or showing up when I didn’t want them, and so on, it required quite a bit of fussing and messing around to make it all work)

I just replied, I had the same problem! and solved it. See my latest reply.

I found it is an issue of the version of ionic js. I changed the nightly js version to a stable released version, all fixed.
check this

Okay cool, for me the issue was just that I used the same view name in 2 places in my UI-router configuration. This mixed up and confused the routing/history system, obviously. The view names should be unique so that Ionic can create and handle separate view histories.