mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
ionic router update
This commit is contained in:
@@ -1,25 +1,12 @@
|
||||
import {App} from 'ionic/ionic';
|
||||
|
||||
import {App, NavController} from 'ionic/ionic';
|
||||
import {FirstPage} from './pages/first-page';
|
||||
import {SecondPage} from './pages/second-page';
|
||||
import {ThirdPage} from './pages/third-page';
|
||||
|
||||
|
||||
@App({
|
||||
routes: [
|
||||
{
|
||||
path: '/firstpage',
|
||||
component: FirstPage,
|
||||
root: true
|
||||
},
|
||||
{
|
||||
path: '/secondpage',
|
||||
component: SecondPage,
|
||||
},
|
||||
{
|
||||
path: '/thirdpage',
|
||||
component: ThirdPage,
|
||||
}
|
||||
]
|
||||
template: '<ion-nav [root]="root"></ion-nav>'
|
||||
})
|
||||
class MyApp {}
|
||||
class E2EApp {
|
||||
constructor() {
|
||||
this.root = FirstPage;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user