Skip to content

Commit d8d9362

Browse files
committed
refactor(ionTabs): make navView be detected in link function
1 parent 288d4ac commit d8d9362

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

js/angular/directive/tab.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,6 @@ function($rootScope, $animate, $ionicBind, $compile) {
5252
controller: '$ionicTab',
5353
scope: true,
5454
compile: function(element, attr) {
55-
var navView = element[0].querySelector('ion-nav-view') ||
56-
element[0].querySelector('data-ion-nav-view');
57-
var navViewName = navView && navView.getAttribute('name');
5855

5956
//We create the tabNavTemplate in the compile phase so that the
6057
//attributes we pass down won't be interpolated yet - we want
@@ -80,6 +77,10 @@ function($rootScope, $animate, $ionicBind, $compile) {
8077
var tabsCtrl = ctrls[0];
8178
var tabCtrl = ctrls[1];
8279

80+
var navView = tabContent[0].querySelector('ion-nav-view') ||
81+
tabContent[0].querySelector('data-ion-nav-view');
82+
var navViewName = navView && navView.getAttribute('name');
83+
8384
$ionicBind($scope, $attr, {
8485
animate: '=',
8586
onSelect: '&',

js/angular/directive/tabNav.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ IonicModule
2626
tabCtrl = ctrls[1];
2727

2828
//Remove title attribute so browser-tooltip does not apear
29-
// $element[0].removeAttribute('title');
29+
$element[0].removeAttribute('title');
3030

3131
$scope.selectTab = function(e) {
3232
e.preventDefault();

0 commit comments

Comments
 (0)