Meteor 1.2 with barbatus: ionic2-meteor
I tried what @Andreas Siivola said to try (override css for tab ion-tabs.back-button) and it popped up on the tab but unfortunately it did not put the parent page of the tab (containing <ion-tabs> ) , and I was left with the parent navigation bar and the black area where there used to be a tab view. Then I could press the parent return button and finally return to the previous page. So instead, I created my own return button so that I can bind the click event to it. At the top of all my tabs, I have a back button navigation bar.
<ion-navbar primary *navbar> <ion-button start> <button clear light (click)="goBack()"><ion-icon name="arrow-back"></ion-icon></button> </ion-button> <ion-title>TabTitle</ion-title> </ion-navbar>
Then in my typescript file I have a click method
goBack():void { this.nav.rootNav.pop(); }
The trick was to get rootNav and call pop (). This brought me back to the page that clicked the page containing the tabs.
Edit: Meteor 1.3.2.4 with ion angular NPM
I believe this will also work in a regular ionic application.
ion-tabs ion-navbar-section ion-navbar .back-button { display: inline-block; }
Update: Ionic 2.0.0-rc.5 Using css to make the back button appear, you can override the back button event and close the parent (Views) display controller using:
this.nav.parent.viewCtrl.dismiss();
tab1.html
<ion-navbar class="force-back-button">
tab1.css
.force-back-button .back-button { display: inline-block; }
tab1.ts
import {OnInit, ViewChild} from '@angular/core'; import {NavController, Navbar} from 'ionic-angular'; export class TabPage implements OnInit { @ViewChild(Navbar) navBar:Navbar; constructor(public nav:NavController) { } ngOnInit() { } ionViewDidLoad() { this.navBar.backButtonClick = (e:UIEvent) => { console.log("Back button clicked"); this.nav.parent.viewCtrl.dismiss(); }; } }