mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
docs(demos/tabs): fix page event handler
This commit is contained in:
@@ -18,14 +18,11 @@ class TabIconTextPage {
|
||||
this.platform = platform;
|
||||
this.isAndroid = platform.is('android');
|
||||
}
|
||||
onInit() {
|
||||
onPageWillEnter() {
|
||||
console.log('enter');
|
||||
document.getElementById('md-tabs-icon-text').style.display = "block";
|
||||
document.getElementById('md-only').style.display = "none";
|
||||
}
|
||||
onDestroy() {
|
||||
document.getElementById('md-tabs-icon-text').style.display = "none";
|
||||
document.getElementById('md-only').style.display = "block";
|
||||
}
|
||||
}
|
||||
|
||||
@Page({
|
||||
@@ -44,4 +41,10 @@ export class IconTextPage {
|
||||
this.tabThree = TabIconTextPage;
|
||||
this.tabFour = TabIconTextPage;
|
||||
}
|
||||
|
||||
onPageWillLeave() {
|
||||
document.getElementById('md-tabs-icon-text').style.display = "none";
|
||||
document.getElementById('md-only').style.display = "block";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -18,14 +18,10 @@ class TabIconPage {
|
||||
this.platform = platform;
|
||||
this.isAndroid = platform.is('android');
|
||||
}
|
||||
onInit() {
|
||||
onPageWillEnter() {
|
||||
document.getElementById('md-tabs-icon').style.display = "block";
|
||||
document.getElementById('md-only').style.display = "none";
|
||||
}
|
||||
onDestroy() {
|
||||
document.getElementById('md-tabs-icon').style.display = "none";
|
||||
document.getElementById('md-only').style.display = "block";
|
||||
}
|
||||
}
|
||||
|
||||
@Page({
|
||||
@@ -44,4 +40,10 @@ export class IconPage {
|
||||
this.tabThree = TabIconPage;
|
||||
this.tabFour = TabIconPage;
|
||||
}
|
||||
|
||||
onPageWillLeave() {
|
||||
document.getElementById('md-tabs-icon').style.display = "none";
|
||||
document.getElementById('md-only').style.display = "block";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user