i follow this codepen hide ion-tabs :
<ion-tabs ng-class="{'tabs-item-hide': hidetabs}"> // --> tabs go here </ion-tabs> <ion-view hide-tabs> // --> contents </ion-view>
my directives.js
.directive('hidetabs', function($rootscope, $ionictabsdelegate) { return { restrict: 'a', link: function($scope, $el) { $scope.$on("$ionicview.beforeenter", function () { $ionictabsdelegate.showbar(false); }); $scope.$on("$ionicview.beforeleave", function () { $ionictabsdelegate.showbar(true); }); } }; });
it works fine, suppose have third level of navigation (after chat-detail.html in chats tabs), we'll call chat-detail-more.html. if use button go chat-detail.html, tabs bar comes idea hide tabs bar in case ?
you can use "hidden" attribute of ion-tab -
<ion-tabs class="tabs-icon-top tabs-color-active-positive "> <ion-tab hidden="{{condition}}" title="home" icon-off="ion-ios-home-outline" icon-on="ion-ios-home" href="#/tab/chats"> </ion-tab> <ion-tab hidden="{{condition}}" title="log-in" icon-off="ion-person-stalker" icon-on="ion-person-stalker" href="#/tab/login"> </ion-tab> </ion-tabs>
using can show/hide tab. hope you.
Comments
Post a Comment