docs(demos/tabs): fix page event handler

This commit is contained in:
Drew Rygh
2015-12-16 16:32:47 -06:00
parent a723914f67
commit 9a718a9fbb
2 changed files with 15 additions and 10 deletions

View File

@@ -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";
}
}

View File

@@ -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";
}
}