Ionic2 - Hide the back button on the modal view that was inherited from the navigation view

I have a modal view, once an element inside that modal is clicked, it goes to a navigation view (normally a back button appears). The issue is that, when you pop back from the navigation to the modal, a new back button appears (that’s the one I want to hide) besides to the close button I have already on the modal.

Any ideas on how to hide the back button from the modal?

Anyway you could replicate this in a small demo and put it on github? Sounds like a bug, but it helps to see a demo first

Hi! I have the same problem - I have a page with a navbar. I present a modal over that page using this.nav.present().

Inside the modal I push another page that shows a back button as normal. When I select the back button to pop the page and go back to the page with the modal, the modal now has a back button. The new back button closes the modal but I already have a close button for the modal.

Here is a codepen example of the following - sorry it’s a bit clunky but you should be able to navigate through it to see the problem…

For now I am using the hideBackbutton attribute on the modal’s navbar.

1 Like