mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
router wip
This commit is contained in:
@@ -1,14 +1,11 @@
|
||||
import {IonicComponent, IonicView, IonicConfig, IonicApp} from 'ionic/ionic';
|
||||
import {IonicComponent, IonicView, IonicConfig, IonicApp, Routable} from 'ionic/ionic';
|
||||
import {NavParams, NavController} from 'ionic/ionic';
|
||||
|
||||
import {SecondPage} from './second-page'
|
||||
|
||||
|
||||
@IonicComponent({
|
||||
selector: 'ion-view',
|
||||
route: {
|
||||
path: '/firstpage'
|
||||
}
|
||||
selector: 'ion-view'
|
||||
})
|
||||
@IonicView({
|
||||
template: '' +
|
||||
@@ -49,7 +46,6 @@ export class FirstPage {
|
||||
}
|
||||
|
||||
viewLoaded() {
|
||||
//this.router = FirstPage.router.invoke(this);
|
||||
console.log('viewLoaded first page');
|
||||
}
|
||||
|
||||
@@ -82,6 +78,6 @@ export class FirstPage {
|
||||
}
|
||||
}
|
||||
|
||||
// new Routable(FirstPage, {
|
||||
// url: '/first-page'
|
||||
// })
|
||||
new Routable(FirstPage, {
|
||||
path: '/firstpage'
|
||||
});
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {IonicComponent, IonicView, NavController, NavParams} from 'ionic/ionic';
|
||||
import {IonicComponent, IonicView, Routable, NavController, NavParams} from 'ionic/ionic';
|
||||
import {ThirdPage} from './third-page';
|
||||
|
||||
|
||||
@@ -78,6 +78,6 @@ export class SecondPage {
|
||||
|
||||
}
|
||||
|
||||
// new Routable(SecondPage, {
|
||||
// url: '/second-page'
|
||||
// })
|
||||
new Routable(SecondPage, {
|
||||
path: '/secondpage'
|
||||
});
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {IonicComponent, IonicView, NavController} from 'ionic/ionic';
|
||||
import {IonicComponent, IonicView, Routable, NavController} from 'ionic/ionic';
|
||||
|
||||
|
||||
@IonicComponent({
|
||||
@@ -59,7 +59,6 @@ export class ThirdPage {
|
||||
|
||||
}
|
||||
|
||||
|
||||
// new Routable(ThirdPage, {
|
||||
// url: '/third-page'
|
||||
// })
|
||||
new Routable(ThirdPage, {
|
||||
path: '/thirdpage'
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user