chore(tab): do not add .pane to ion-nav-view tab

This commit is contained in:
Adam Bradley
2014-11-30 10:20:26 -06:00
parent 597e28c957
commit 92d0385cb1

View File

@@ -75,17 +75,19 @@ function($compile, $ionicConfig, $ionicBind, $ionicViewSwitcher) {
var childElementCount = tabContentEle.childElementCount;
element.empty();
var navViewName;
var navViewName, isNavView;
if (childElementCount) {
if (tabContentEle.children[0].tagName === 'ION-NAV-VIEW') {
// get the name if it's a nav-view
navViewName = tabContentEle.children[0].getAttribute('name');
tabContentEle.children[0].classList.add('view-container');
isNavView = true;
}
if(childElementCount === 1) {
// make the 1 child element the primary tab content container
tabContentEle = tabContentEle.children[0];
}
tabContentEle.classList.add('pane');
if (!isNavView) tabContentEle.classList.add('pane');
tabContentEle.classList.add('tab-content');
}