@@ -56,21 +56,18 @@ function($rootScope, $animate, $ionicBind, $compile) {
56
56
element [ 0 ] . querySelector ( 'data-ion-nav-view' ) ;
57
57
var navViewName = navView && navView . getAttribute ( 'name' ) ;
58
58
59
-
60
- //We create the tabNavElement in the compile phase so that the
59
+ //We create the tabNavTemplate in the compile phase so that the
61
60
//attributes we pass down won't be interpolated yet - we want
62
61
//to pass down the 'raw' versions of the attributes
63
- var tabNavElement = angular . element (
64
- '<ion-tab-nav' +
62
+ var tabNavTemplate = '<ion-tab-nav' +
65
63
attrStr ( 'ng-click' , attr . ngClick ) +
66
64
attrStr ( 'title' , attr . title ) +
67
65
attrStr ( 'icon' , attr . icon ) +
68
66
attrStr ( 'icon-on' , attr . iconOn ) +
69
67
attrStr ( 'icon-off' , attr . iconOff ) +
70
68
attrStr ( 'badge' , attr . badge ) +
71
69
attrStr ( 'badge-style' , attr . badgeStyle ) +
72
- '></ion-tab-nav>'
73
- ) ;
70
+ '></ion-tab-nav>' ;
74
71
75
72
//Remove the contents of the element so we can compile them later, if tab is selected
76
73
//We don't use regular transclusion because it breaks element inheritance
@@ -113,6 +110,7 @@ function($rootScope, $animate, $ionicBind, $compile) {
113
110
}
114
111
}
115
112
113
+ var tabNavElement = angular . element ( tabNavTemplate ) ;
116
114
tabNavElement . data ( '$ionTabsController' , tabsCtrl ) ;
117
115
tabNavElement . data ( '$ionTabController' , tabCtrl ) ;
118
116
tabsCtrl . $tabsElement . append ( $compile ( tabNavElement ) ( $scope ) ) ;
0 commit comments