Skip to content

Commit

Permalink
refactor(ionTabs): make navView be detected in link function
Browse files Browse the repository at this point in the history
  • Loading branch information
ajoslin committed Apr 30, 2014
1 parent 288d4ac commit d8d9362
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions js/angular/directive/tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ function($rootScope, $animate, $ionicBind, $compile) {
controller: '$ionicTab',
scope: true,
compile: function(element, attr) {
var navView = element[0].querySelector('ion-nav-view') ||
element[0].querySelector('data-ion-nav-view');
var navViewName = navView && navView.getAttribute('name');

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

var navView = tabContent[0].querySelector('ion-nav-view') ||
tabContent[0].querySelector('data-ion-nav-view');
var navViewName = navView && navView.getAttribute('name');

$ionicBind($scope, $attr, {
animate: '=',
onSelect: '&',
Expand Down
2 changes: 1 addition & 1 deletion js/angular/directive/tabNav.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ IonicModule
tabCtrl = ctrls[1];

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

$scope.selectTab = function(e) {
e.preventDefault();
Expand Down

0 comments on commit d8d9362

Please sign in to comment.