mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
@@ -31,6 +31,7 @@ export class ChatPage {
|
||||
templateUrl: './tabs.html'
|
||||
})
|
||||
export class TabsPage {
|
||||
showTab: boolean = false;
|
||||
|
||||
@ViewChild(Tabs) tabs: Tabs;
|
||||
|
||||
@@ -42,7 +43,9 @@ export class TabsPage {
|
||||
});
|
||||
}
|
||||
|
||||
onTabChange() {
|
||||
onTabChange(tab: Tab) {
|
||||
this.showTab = tab.index !== 1;
|
||||
|
||||
// wired up through the template
|
||||
// <ion-tabs (ionChange)="onTabChange()">
|
||||
console.log('onTabChange');
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
<ion-tabs preloadTabs="false" (ionChange)="onTabChange()">
|
||||
<ion-tabs preloadTabs="false" (ionChange)="onTabChange($event)">
|
||||
<ion-tab tabTitle="Recents" tabIcon="call" root="Tab1Page1" swipeBackEnabled="true"></ion-tab>
|
||||
<ion-tab tabTitle="Favorites" tabIcon="star" root="Tab2Page1"></ion-tab>
|
||||
<ion-tab tabTitle="Settings" tabIcon="settings" root="Tab3Page1"></ion-tab>
|
||||
<ion-tab tabTitle="Chat" tabIcon="chatbubbles" (ionSelect)="chat()"></ion-tab>
|
||||
<ion-tab tabTitle="Chat" tabIcon="chatbubbles" (ionSelect)="chat()" [show]="showTab"></ion-tab>
|
||||
</ion-tabs>
|
||||
|
||||
Reference in New Issue
Block a user