mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
refactor(ionTabs): make navView be detected in link function
This commit is contained in:
7
js/angular/directive/tab.js
vendored
7
js/angular/directive/tab.js
vendored
@@ -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
|
||||
@@ -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: '&',
|
||||
|
||||
2
js/angular/directive/tabNav.js
vendored
2
js/angular/directive/tabNav.js
vendored
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user