mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-23 05:58:26 +08:00
42 lines
768 B
JavaScript
42 lines
768 B
JavaScript
import {Component, onInit} from 'angular2/src/core/annotations_impl/annotations';
|
|
|
|
import {IonicView, IonicConfig} from 'ionic/ionic';
|
|
import {FirstPage} from './pages/first-page'
|
|
|
|
|
|
@Component({
|
|
selector: 'ion-app'
|
|
})
|
|
@IonicView({
|
|
template: '<ion-nav [root]="rootView"></ion-nav>'
|
|
})
|
|
class MyApp {
|
|
constructor() {
|
|
this.rootView = FirstPage;
|
|
}
|
|
}
|
|
|
|
export function main(ionicBootstrap) {
|
|
|
|
var routes = {
|
|
FirstPage: {
|
|
url: 'firstpage',
|
|
module: './first-page',
|
|
},
|
|
SecondPage: {
|
|
url: 'secondpage',
|
|
module: './second-page'
|
|
},
|
|
ThirdPage: {
|
|
url: 'thirdpage',
|
|
module: './third-page'
|
|
},
|
|
};
|
|
|
|
let myConfig = new IonicConfig();
|
|
|
|
//myConfig.routes(routes);
|
|
|
|
ionicBootstrap(MyApp, myConfig, routes);
|
|
}
|