Files
2017-01-13 15:16:24 -05:00

55 lines
932 B
TypeScript

import { Component, ChangeDetectorRef, NgModule } from '@angular/core';
import { IonicApp, IonicModule, reorderArray } from '../../../..';
@Component({
templateUrl: 'main.html'
})
export class E2EPage {
items: any[] = [];
isReordering: boolean = false;
constructor(private d: ChangeDetectorRef) {
let nu = 9;
for (let i = 0; i < nu; i++) {
this.items.push(i);
}
}
clickedButton(num: number) {
console.log('clicked', num);
}
toggle() {
this.isReordering = !this.isReordering;
}
reorder(indexes: any) {
this.items = reorderArray(this.items, indexes);
}
}
@Component({
template: '<ion-nav [root]="root"></ion-nav>'
})
export class E2EApp {
root = E2EPage;
}
@NgModule({
declarations: [
E2EApp,
E2EPage
],
imports: [
IonicModule.forRoot(E2EApp)
],
bootstrap: [IonicApp],
entryComponents: [
E2EApp,
E2EPage
]
})
export class AppModule {}