chore(build): fix demo compile errors, tslint errors

fix demo compile errors, tslint errors
This commit is contained in:
Dan Bucholtz
2016-09-15 12:57:38 -05:00
parent 70127346c4
commit 7a660af187
120 changed files with 306 additions and 291 deletions

View File

@ -0,0 +1,60 @@
import { Component, NgModule } from '@angular/core';
import { IonicApp, IonicModule, NavController } from 'ionic-angular';
let pageNum = 2;
@Component({
templateUrl: 'main.html'
})
export class ApiDemoPage {
constructor(public navCtrl: NavController) {}
push() {
this.navCtrl.push(PushPage);
}
}
@Component({
templateUrl: 'page.html'
})
export class PushPage {
pageNum = pageNum;
constructor(public navCtrl: NavController) {}
push() {
pageNum++;
this.navCtrl.push(PushPage);
}
pop() {
if (pageNum > 2) {
pageNum--;
}
this.navCtrl.pop();
}
}
@Component({
template: '<ion-nav [root]="root"></ion-nav>'
})
export class ApiDemoApp {
root = ApiDemoPage;
}
@NgModule({
declarations: [
PushPage,
ApiDemoApp,
ApiDemoPage
],
imports: [
IonicModule.forRoot(ApiDemoApp)
],
bootstrap: [IonicApp],
entryComponents: [
ApiDemoPage
]
})
export class AppModule {}

View File

@ -0,0 +1,14 @@
<ion-header>
<ion-navbar>
<ion-title>Navigation</ion-title>
</ion-navbar>
</ion-header>
<ion-content padding>
<button ion-button block (click)="push()">Push New Page</button>
</ion-content>

View File

@ -0,0 +1,15 @@
<ion-header>
<ion-navbar>
<ion-title>Page {{pageNum}}</ion-title>
</ion-navbar>
</ion-header>
<ion-content padding>
<button ion-button block (click)="push()">Push Another Page</button>
<button ion-button color="secondary" block (click)="pop()">Pop This Page</button>
</ion-content>