router wip

This commit is contained in:
Adam Bradley
2015-06-29 22:36:19 -05:00
parent 42a641a03e
commit 1927cb8bb1
7 changed files with 83 additions and 54 deletions

View File

@@ -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'
});

View File

@@ -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'
});

View File

@@ -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'
});