This commit is contained in:
Max Lynch
2015-06-18 11:42:24 -05:00
parent dd16e1d0c5
commit df63eb9fe8
4 changed files with 74 additions and 8 deletions

View File

@@ -1,15 +1,19 @@
import {bootstrap} from 'angular2/angular2'
import {bootstrap, onInit, QueryList} from 'angular2/angular2'
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
import {View} from 'angular2/src/core/annotations_impl/view';
import {Nav} from 'ionic/components/nav/nav';
import {FirstPage} from './pages/first-page';
import {Router} from 'ionic/routing/router';
@Component({ selector: 'ion-app' })
@Component({
selector: 'ion-app',
})
@View({
template: `
<ion-nav [initial]="initial"></ion-nav>
<ion-nav #nav [initial]="initial"></ion-nav>
`,
directives: [Nav]
})

View File

@@ -2,6 +2,7 @@ import {Component, Directive, onInit} from 'angular2/src/core/annotations_impl/a
import {View} from 'angular2/src/core/annotations_impl/view';
import {Routable, Router, NavController, NavbarTemplate, Navbar, NavPush, Content} from 'ionic/ionic';
import {IonicApp} from '../index';
import {SecondPage} from './second-page';
@Component({
@@ -34,6 +35,10 @@ export class FirstPage {
constructor(
nav: NavController
) {
// TODO: Shouldn't have to do this
Router.setNavController(nav);
this.nav = nav;
this.val = Math.round(Math.random() * 8999) + 1000;

View File

@@ -32,6 +32,9 @@ export class SecondPage {
nav: NavController,
params: NavParams
) {
// TODO: Shouldn't have to do this
Router.setNavController(nav);
this.nav = nav;
this.params = params;
this.val = Math.round(Math.random() * 8999) + 1000;