Ionic back Button Showing in Main page


#1

I land to main app page. And the header has menu hamburger as shown

View 1

Now I go to another View 2 where I see the hamburger (as expected)

but when I press back button the main menu appears with back button. It should be a hamburger menu.
Issue

I tried using enable-menu-with-back-views="true" which solves the issue partially.
It makes sure that both primary views View1 and View2 are having hamburger when I press back button.

But the View1> SubView1 now displays like

how do I solve this problem?

Update

I don’t have a code pen, but the problem can be seen in starter template.

  • browse to main page Playlist.
  • Click Hamburger and go to Search
  • Click back button in browser (this replicates the back button of mobile)

I want hamburger to appear on back button press.

Note: when I click an item in Playlist the sub view should have the back button which shouldn’t be affected.


#2

you should make a codepen so the forum users can play around and see what is wrong with your code. Maybe you have more redirects in your navigation to view2. or your state-defintion leads to this.


#3

add a attribute in ion-view tag

hide-back-button=“true”


#4

yeah but thats not a solution… thats makeup to hide some maybe fail-behavior :wink:


#5

@bengtler I have updated the question, kindly check and provide a solution.