chore(demos): convert to aot structure

convert to aot structure
This commit is contained in:
Dan Bucholtz
2016-09-15 14:40:30 -05:00
parent 7a660af187
commit c7ce93d9fe
182 changed files with 1622 additions and 1040 deletions

View File

@ -0,0 +1,64 @@
import { Component } from '@angular/core';
import { ActionSheetController, Platform } from 'ionic-angular';
@Component({
templateUrl: 'page.html'
})
export class ApiDemoPage {
constructor(public alertCtrl: ActionSheetController, public platform: Platform) { }
present() {
let actionSheet = this.alertCtrl.create({
title: 'Albums',
buttons: [
{
text: 'Delete',
role: 'destructive',
icon: !this.platform.is('ios') ? 'trash' : null,
handler: () => {
console.log('Delete clicked');
}
},
{
text: 'Share',
icon: !this.platform.is('ios') ? 'share' : null,
handler: () => {
console.log('Share clicked');
}
},
{
text: 'Play',
icon: !this.platform.is('ios') ? 'arrow-dropright-circle' : null,
handler: () => {
console.log('Play clicked');
}
},
{
text: 'Favorite',
icon: !this.platform.is('ios') ? 'heart-outline' : null,
handler: () => {
console.log('Favorite clicked');
}
},
{
text: 'Cancel',
role: 'cancel', // will always sort to be on the bottom
icon: !this.platform.is('ios') ? 'close' : null,
handler: () => {
console.log('Cancel clicked');
}
}
]
});
actionSheet.present();
}
}
@Component({
template: '<ion-nav [root]="root"></ion-nav>'
})
export class ApiDemoApp {
root = ApiDemoPage;
}