Skip to content

Instantly share code, notes, and snippets.

@trongrg
Last active March 26, 2016 10:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trongrg/0c637b201ced41061517 to your computer and use it in GitHub Desktop.
Save trongrg/0c637b201ced41061517 to your computer and use it in GitHub Desktop.
ionic tab navigation bug
<ion-navbar *navbar>
<ion-title>Tab 1</ion-title>
</ion-navbar>
<ion-content padding class="page1">
<h2 (click)="clicked()">Welcome to Ionic!</h2>
<p>
This starter project comes with simple tabs-based layout for apps
that are going to primarily use a Tabbed UI.
</p>
<p>
Take a look at the <code>www/app/</code> directory to add or change tabs,
update any existing page or create new pages.
</p>
</ion-content>
import {Page, NavController} from 'ionic-angular';
import {Page2} from '../page2/page2';
@Page({
templateUrl: 'build/pages/page1/page1.html'
})
export class Page1 {
static get parameters() {
return [[NavController]];
}
constructor(nav) {
this.nav = nav;
}
clicked() {
console.log('clicked');
this.nav.push(Page2);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment