import {App, Page, NavController, Alert, Modal, ViewController} from 'ionic-angular'; // // Modal // @Page({ template: ` Filter Sessions Tracks Toggle {{i}} ` }) class MyModal { items: any[] = []; constructor(private viewCtrl: ViewController) { for (var i = 1; i <= 10; i++) { this.items.push(i); } } dismiss() { // using the injected ViewController this page // can "dismiss" itself and pass back data this.viewCtrl.dismiss(); } } // // Tab 1 // @Page({ template: ` Heart Tab 1 Item {{i}} {{i}} {{i}} {{i}} ` }) export class Tab1 { items: any[] = []; constructor() { for (var i = 1; i <= 250; i++) { this.items.push(i); } } } // // Tab 2 // @Page({ template: ` Schedule

{{session.name}} {{session.name}} {{session.name}}

{{session.location}} {{session.location}} {{session.location}}

` }) export class Tab2 { sessions: any[] = []; constructor() { for (var i = 1; i <= 250; i++) { this.sessions.push({ name: 'Name ' + i, location: 'Location: ' + i }); } } } // // Tab 3 // @Page({ template: ` Stopwatch

Tab 3

` }) export class Tab3 { constructor(private nav: NavController) {} presentAlert() { let alert = Alert.create({ title: 'Alert Title!', buttons: ['Dismiss'] }); this.nav.present(alert); } presentModal() { let modal = Modal.create(MyModal); this.nav.present(modal); } } @Page({ template: ` Menu ` }) export class TabsPage { root1 = Tab1; root2 = Tab2; root3 = Tab3; } @App({ template: `` }) export class e2eApp { root = TabsPage; }