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,21 +1,22 @@
|
||||
import {Component, View, Parent} from 'angular2/angular2'
|
||||
import {Nav} from 'ionic/components'
|
||||
import {NavController} from 'ionic/components'
|
||||
import {ThirdPage} from 'pages/third-page'
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'second-page'
|
||||
})
|
||||
@Component()
|
||||
@View({
|
||||
templateUrl: 'pages/second-page.html',
|
||||
directives: []
|
||||
templateUrl: 'pages/second-page.html'
|
||||
})
|
||||
export class SecondPage {
|
||||
constructor(
|
||||
@Parent() viewport: Nav
|
||||
nav: NavController
|
||||
) {
|
||||
this.viewport = viewport
|
||||
this.nav = nav
|
||||
}
|
||||
pop() {
|
||||
this.viewport.pop()
|
||||
this.nav.pop();
|
||||
}
|
||||
push() {
|
||||
this.nav.push(ThirdPage);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user