fix(tabs): don't preload if already loaded

This commit is contained in:
Adam Bradley
2015-11-09 14:38:12 -06:00
parent e0f18a5de2
commit ca74f1a813

View File

@@ -90,7 +90,7 @@ export class Tab extends NavController {
this.tabs.select(this);
} else if (this.tabs.preloadTabs) {
setTimeout(() => {
this._loadTm = setTimeout(() => {
let opts = {
animate: false,
preload: true
@@ -114,6 +114,8 @@ export class Tab extends NavController {
loadPage(viewCtrl, navbarContainerRef, done) {
// by default a page's navbar goes into the shared tab's navbar section
clearTimeout(this._loadTm);
navbarContainerRef = this.tabs.navbarContainerRef;
let isTabSubPage = (this.tabs.subPages && viewCtrl.index > 0);