Last active
March 26, 2016 10:49
-
-
Save trongrg/0c637b201ced41061517 to your computer and use it in GitHub Desktop.
ionic tab navigation bug
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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