Changed tabs not use isolated scope

This commit is contained in:
Max Lynch
2013-11-18 10:47:18 -06:00
parent fd0e24def9
commit f300b162f1
2 changed files with 16 additions and 12 deletions

View File

@ -39,24 +39,26 @@ angular.module('ionic.ui.tabs', ['ngAnimate'])
};
$scope.controllers = this.controllers;
$scope.tabsController = this;
}])
.directive('tabs', function() {
return {
restrict: 'E',
replace: true,
scope: {
animation: '@',
controllerChanged: '&',
tabsType: '@',
tabsStyle: '@',
},
scope: true,
transclude: true,
controller: 'TabsCtrl',
//templateUrl: 'ext/angular/tmpl/ionicTabBar.tmpl.html',
template: '<div class="content"><tab-controller-bar></tab-controller-bar></div>',
compile: function(element, attr, transclude, tabsCtrl) {
return function($scope, $element, $attr) {
$scope.tabsType = $attr.tabsType || 'tabs-positive';
$scope.tabsStyle = $attr.tabsStyle;
$scope.animation = $attr.animation;
$scope.$watch('activeAnimation', function(value) {
//$element.removeClass($scope.animation + ' ' + $scope.animation + '-reverse');
$element.addClass($scope.activeAnimation);