mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(tabs): disable tab preloading
This commit is contained in:
@@ -113,7 +113,6 @@ export class Tabs extends Ion {
|
||||
) {
|
||||
super(elementRef, config);
|
||||
this.app = app;
|
||||
this.preload = config.get('preloadTabs');
|
||||
this.subPages = config.get('tabSubPages');
|
||||
|
||||
// collection of children "Tab" instances, which extends NavController
|
||||
@@ -139,6 +138,8 @@ export class Tabs extends Ion {
|
||||
*/
|
||||
onInit() {
|
||||
super.onInit();
|
||||
this.preloadTabs = (this.preloadTabs !== "false" && this.preloadTabs !== false);
|
||||
|
||||
if (this.highlight) {
|
||||
this.platform.onResize(() => {
|
||||
this.highlight.select(this.getSelected());
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
<ion-tabs>
|
||||
<ion-tabs preload-tabs="true">
|
||||
<ion-tab tab-title="Recents" tab-icon="call" [root]="tab1Root"></ion-tab>
|
||||
<ion-tab tab-title="Favorites" tab-icon="star" [root]="tab2Root"></ion-tab>
|
||||
<ion-tab tab-title="Settings" tab-icon="settings" [root]="tab3Root"></ion-tab>
|
||||
|
||||
Reference in New Issue
Block a user