mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-26 08:13:34 +08:00
feat(tabs): add select event to tab
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user