make e2e build faster

This commit is contained in:
Andrew
2015-04-25 14:45:21 -05:00
parent 8f4b406831
commit 61eb9b06c7
24 changed files with 114 additions and 111 deletions

View File

@@ -0,0 +1,2 @@
<ion-nav [initial-component]="initial">
</ion-nav>

View File

@@ -0,0 +1,18 @@
import {Component, View as NgView, bootstrap} from 'angular2/angular2'
import {Nav} from 'ionic/components/nav/nav'
import {Log} from 'ionic/util'
import {FirstPage} from 'pages/first-page'
@Component({ selector: '[ion-app]' })
@NgView({
directives: [Nav],
templateUrl: 'main.html'
})
class IonicApp {
constructor() {
this.initial = FirstPage
console.log('IonicApp Start')
}
}
bootstrap(IonicApp)

View File

@@ -0,0 +1,3 @@
<ion-view nav-title="First Page">
<button (click)="nextPage()">Push Page 2</button>
</ion-view>

View File

@@ -0,0 +1,22 @@
import {Component, View as NgView, Parent} from 'angular2/angular2'
import {Nav, View} from 'ionic/ionic'
import {SecondPage} from 'pages/second-page'
@Component({
selector: 'first-page'
})
@NgView({
templateUrl: 'pages/first-page.html',
directives: [View]
})
export class FirstPage {
constructor(
@Parent() viewport: Nav
) {
this.viewport = viewport
}
nextPage() {
this.viewport.push(SecondPage)
}
}

View File

@@ -0,0 +1,3 @@
<ion-view nav-title="Second Page">
<button (click)="pop()">Pop (Go back)</button>
</ion-view>

View File

@@ -0,0 +1,21 @@
import {Component, View as NgView, Parent} from 'angular2/angular2'
import {Nav} from 'ionic/components'
import {View} from 'ionic/components/view/view'
@Component({
selector: 'second-page'
})
@NgView({
templateUrl: 'pages/second-page.html',
directives: [View]
})
export class SecondPage {
constructor(
@Parent() viewport: Nav
) {
this.viewport = viewport
}
pop() {
this.viewport.pop()
}
}