feat(tabs): add select event to tab

This commit is contained in:
Adam Bradley
2015-12-21 09:50:14 -06:00
parent f3e2f427bf
commit 0dd6b2f4bd
4 changed files with 47 additions and 10 deletions

View File

@ -1,6 +1,6 @@
import {RouteConfig, Location} from 'angular2/router';
import {App, Page, NavController} from 'ionic/ionic';
import {App, Page, NavController, Modal} from 'ionic/ionic';
@Page({
@ -36,15 +36,33 @@ class SignIn {
}
@Page({
template: `
<ion-toolbar>
<ion-title>Chat Modal</ion-title>
</ion-toolbar>
<ion-content padding>
<p><button (click)="close()">Close Modal</button></p>
</ion-content>
`
})
class ChatPage {}
@Page({
templateUrl: './tabs.html'
})
class TabsPage {
constructor(nav: NavController) {
constructor(private modal: Modal) {
this.tab1Root = Tab1Page1
this.tab2Root = Tab2Page1
this.tab3Root = Tab3Page1
}
chat() {
console.log('Chat clicked!');
this.modal.open(ChatPage);
}
}