I have requirement , i need hide the tabs for some states. and i implement it.
That is my implements:
Controller:
> .controller('TabsCtrl', function($scope,$rootScope, $ionicTabsDelegate) {
> $scope.hide_tabs = false;
> var no_tabs_states = ['tab.chat-detail','tab.friend-detail',];
> $rootScope.$on('$stateChangeSuccess',
> function(event, toState, toParams, fromState, fromParams){
> if ( jQuery.inArray(toState.name, no_tabs_states) != -1 ){
> $scope.hide_tabs = true;
> }else{
> $scope.hide_tabs = false;
> }
> });
Template:
<ion-tabs ng-class="{'tabs-item-hide': hide_tabs}" class="tabs-icon-top tabs-color-active-positive">
wish help other people have the save requirement.and wellcome replies, thank .