import {App, Page, NavController, Alert, Modal, ViewController} from 'ionic/ionic'; // // Modal // @Page({ template: ` Cancel Filter Sessions Done Tracks Toggle {{i}} Reset All Filters ` }) class MyModal { constructor(viewCtrl: ViewController) { this.viewCtrl = viewCtrl; this.items = []; 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}} ` }) class Tab1 { constructor(nav: NavController) { this.nav = nav; this.items = []; 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}} SpeakerInfo Add toFavorites ` }) class Tab2 { constructor() { this.sessions = []; for(var i = 1; i <= 250; i++) { this.sessions.push({ name: 'Name ' + i, location: 'Location: ' + i }); } } } // // Tab 3 // @Page({ template: ` Stopwatch Tab 3 Present Alert Present Modal ` }) class Tab3 { constructor(nav: NavController) { this.nav = nav; } 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 Close Menu ` }) export class TabsPage { constructor() { this.root1 = Tab1; this.root2 = Tab2; this.root3 = Tab3; } } @App({ template: `` }) export class e2eApp { constructor() { this.root = TabsPage; } }
{{session.location}} {{session.location}} {{session.location}}
Present Alert Present Modal