v2 : ion-navbar does not show back button in ion-tabs page
See original GitHub issueShort description of the problem:
Since v2 beta 10 ion-navbar does not show back button in ion-tabs page.
What behavior are you expecting?
If there is a possibility to go back to another view from an ion-tabs base page, it should display the back button and not the menu button.
Steps to reproduce:
- Create a simple app : A left menu, a simple page that push an ion-tabs page with the following toolbar :
<ion-navbar>
<button menuToggle="left">
<ion-icon name="menu"></ion-icon>
</button>
</ion-navbar>
- Navigate to it and it will show a menu button that does not allow to go back. (it triggers the menu)
Which Ionic Version? v2 beta 10
Run ionic info
from terminal/cmd prompt: (paste output below)
Your system information:
Cordova CLI: You have been opted out of telemetry. To change this, run: cordova telemetry on. 6.2.0
Gulp version: CLI version 3.9.0 Gulp local: Local version 3.9.1 Ionic Framework Version: 2.0.0-beta.10 Ionic CLI Version: 2.0.0-beta.32 Ionic App Lib Version: 2.0.0-beta.18 OS: Distributor ID: Ubuntu Description: Ubuntu 16.04 LTS Node Version: v6.3.0
Issue Analytics
- State:
- Created 7 years ago
- Comments:25 (5 by maintainers)
Top Results From Across the Web
Ionic nav-back-button not showing up - Stack Overflow
I'm currently facing the problem that my back button is not showing up. In my events tab, I allow people to click on...
Read more >Ion-nav-back-button doesn't appear with my project structure?
My problem is that when i navigate from home state to user.tab1 state, the back button does not appear in navbar, how can...
Read more >ion-back-button-tabs - npm
Start using ion-back-button-tabs in your project by running `npm i ion-back-button-tabs`. There are no other projects in the npm registry ...
Read more >Ionic Component Documentation
Buttons are simple components in Ionic, can consist of text, an icon, ... If your page has an <ion-navbar> , a back button...
Read more >Navbar missing back button when using Tabs in a child page
tab-root-back.page'; import { TabsContainerPage } from '. ... REAL CODE SHOULD NOT TRANSPILE IN THE BROWSER transpiler: 'ts', typescriptOptions: { tsconfig: ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I just saw @jgw96 closing comment to try using segments instead, but I did find a solution building on @mordka answer.
I found this StackOverflow answer about overriding the back button click http://stackoverflow.com/questions/38906715/ionic-2-generated-back-button-click-event
So by using css to force the back button to be displayed you can override the back button click event and dismiss the parent (Tabs) view controller using:
this.nav.parent.viewCtrl.dismiss();
In your TabPage.ts
If anynone’s interested in having the back button and using tabs here’s a simple css hack:
Would be nice to have
hideBackButton="false"
directive working on nav-bar (docs) .