diff --git a/ionic/components/tabs/tab.js b/ionic/components/tabs/tab.js index 5670be0636..12fce326f5 100644 --- a/ionic/components/tabs/tab.js +++ b/ionic/components/tabs/tab.js @@ -51,26 +51,16 @@ export class Tab extends NavBase { ) { super(tabs, compiler, elementRef, loader, injector); - if (tabs.parent) { - this.sections = tabs.parent.panes['_n'].sections; - } + this.tabs = tabs; this.item = new NavItem(tabs.parent); this.item.setInstance(this); this.item.setViewElement(elementRef.domElement); + this.panes['_n'] = this; tabs.addTab(this.item); - this.tabs = tabs; this.panelId = 'tab-panel-' + this.item.id; this.labeledBy = 'tab-button-' + this.item.id; - - this.elementRef = elementRef; - - this.viewContainerRef = viewContainerRef; - - this.panes['_n'] = this; - - this.domElement = elementRef.domElement; } onInit() { @@ -107,6 +97,6 @@ export class Tab extends NavBase { }) class TabContentAnchor { constructor(@Parent() tab: Tab, viewContainerRef: ViewContainerRef) { - tab.contentContainerRef = viewContainerRef; + this.contentContainerRef = viewContainerRef; } } diff --git a/ionic/components/tabs/tabs.js b/ionic/components/tabs/tabs.js index 62f91d449e..d8d24949aa 100644 --- a/ionic/components/tabs/tabs.js +++ b/ionic/components/tabs/tabs.js @@ -87,6 +87,7 @@ export class Tabs extends NavBase { leavingItem.shouldCache = true; leavingItem.willCache(); + // set the Tab navbarView from the active view in the tab enteringItem.navbarView = (enteringItem.instance.getActive() || {}).navbarView; if (leavingItem.instance) { leavingItem.navbarView = (leavingItem.instance.getActive() || {}).navbarView;