mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 11:41:20 +08:00
nav updates
This commit is contained in:
@ -1,22 +1,21 @@
|
||||
import {Component, View, Parent} from 'angular2/angular2'
|
||||
import {Nav} from 'ionic/ionic'
|
||||
import {NavController} from 'ionic/ionic'
|
||||
import {SecondPage} from 'pages/second-page'
|
||||
|
||||
@Component({
|
||||
selector: 'first-page'
|
||||
})
|
||||
|
||||
@Component()
|
||||
@View({
|
||||
templateUrl: 'pages/first-page.html',
|
||||
directives: []
|
||||
})
|
||||
export class FirstPage {
|
||||
constructor(
|
||||
@Parent() viewport: Nav
|
||||
nav: NavController
|
||||
) {
|
||||
this.viewport = viewport
|
||||
this.nav = nav;
|
||||
}
|
||||
|
||||
nextPage() {
|
||||
this.viewport.push(SecondPage)
|
||||
push() {
|
||||
this.nav.push(SecondPage);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user