Skip to content

Instantly share code, notes, and snippets.

@Alexintosh
Created March 9, 2016 11:36
Show Gist options
  • Save Alexintosh/eb91edd49cd590a46166 to your computer and use it in GitHub Desktop.
Save Alexintosh/eb91edd49cd590a46166 to your computer and use it in GitHub Desktop.
(function(){
'use strict';
angular
.module('app')
.directive('hideTabs', function($rootScope) {
return {
restrict: 'A',
link: function($scope, $el) {
$rootScope.hideTabs = 'tabs-item-hide';
/*
$scope.$on('$destroy', function() {
$rootScope.hideTabs = '';
});*/
}
};
})
.directive('showTabs', function($rootScope) {
return {
restrict: 'A',
link: function($scope, $el) {
$rootScope.hideTabs = '';
}
};
});
})();
---
<ion-tabs class="tabs-icon-only tabs-color-active-positive tabs-bg" ng-class="{'tabs-item-hide': $root.hideTabs}" >
</ion-tabs>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment