-
Notifications
You must be signed in to change notification settings - Fork 13.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Ability to hide tab bar #395
Comments
Just wondering if there are any thoughts on adding this functionality. |
Hey @sicsol, thanks for your patience. it's coming - but with some API changes. Expect it soon(:tm:) |
put an ng-if on ion-tabs, done! |
Wait nevermind, that won't work. Needs to be done, could be easy. |
@ajoslin thanks |
I think I'm being daft here, but how do you apply this <ion-tabs class="tabs-icon-top">
<ion-tab title="Saved" icon="icon ion-ios7-heart-outline" href="#/saved">
<ion-nav-view name="tab-saved" class="slide-left-right"></ion-nav-view>
</ion-tab>
<ion-tab title="Discovery" icon="icon ion-ios7-cart-outline" href="#/products">
<ion-nav-view name="tab-products" class="slide-left-right"></ion-nav-view>
</ion-tab>
<ion-tab title="Account" icon="icon ion-ios7-gear-outline" href="#/account">
<ion-nav-view name="tab-account" class="slide-left-right"></ion-nav-view>
</ion-tab>
</ion-tabs> It appears like the class should be added to the transcluded div generated by It also feels like there should be some way to control this through $ionicTabsDelegate Can anyone tell me if I'm missing something here? |
I found the same problem with @wedgybo |
Im looking to do the same I need to hide the tab on my detail pages. I just don't see where this needs to live if you start a project from the tabs template 'tabs-item-hide' |
@calendee : that's cool stuff, thanks. |
I'm not sure if it's a bug so I will explain my issue here first. If it should be a programming issue I will create a thread in the ionic forum. Please take a look to codepen http://codepen.io/anon/pen/myEQPv I highlighted the content area red to have a better overview about the issue. The explanation to hide tabs but show the content on http://ionicframework.com/docs/components/#tabs tells me to add the The problem is that |
@php-engineer @kekobin great job, thanks a lot. |
@php-engineer and @kekobin , 100 points to Gryffindor. |
Thank you @php-engineer and @kekobin - works great |
Thank you @php-engineer and @kekobin. It helps me a lot! |
I'm using the same solution as above. I'm still curious however why $ionicTabDelegate doesn't have a .show([show]) function to toggle visibility. Seems like a much easier approach. |
Does the ionic tab have animation? can it hide gracefully? like lowering down or something 😄 @steefaan solution works great 😄 |
I'm with @bodinaren. If we can use $ionicTabDelegate.show(boolean) function, managing a tab bar would be much easier. By the way, though @steefaan's solution works well, a solution which I found at a stackoverflow page below would be more "Angular way."
I hope this helps you guys :) |
@takayukisakai: I like it. I'd suggest an improvement to that code to handle caching tho: .directive('hideTabs', function($rootScope) {
return {
restrict: 'A',
link: function($scope, $el) {
$scope.$on("$ionicView.enter", function () {
$rootScope.hideTabs = true;
});
$scope.$on("$ionicView.leave", function () {
$rootScope.hideTabs = false;
});
}
};
}) I also played around with adding it to the $ionicTabsDelegate and came up with this. What do you guys think? https://github.com/bodinaren/ionic/commit/d555f694e3b4693018e0237d0debc0bfeb1d06f3 |
@bodinaren: Thank you for giving your solution. The chat detail page's template has "hide-tabs" attribute. So it should hide the tab bar, but it doesn't. Apparently, both $ionicView.enter and $ionicView.leave are called every time you enter the chat detail page (you can see it on your browser console). |
@bodinaren How do you guys think about this method? |
@takayukisakai Yeah, just remove the $parent. Guess I added it wrong when I tried it. The updated code works now. Also, about your fork. It looks a lot like my fork I just linked in my last post, but mine had more separation of concerns and I think more like the rest of Ionic works (with also returning current status). Also your docs is wrong. Here's mine (I didn't make a PR yet): https://github.com/bodinaren/ionic/commit/d555f694e3b4693018e0237d0debc0bfeb1d06f3 |
@bodinaren: Great! Your code works pretty well after removing $parent. Sorry I didn't notice your commit posted on your comment. I checked your commit just now, and I thought it worths making PR. |
@takayukisakai Thanks a lot,great solution! |
1 |
@takayukisakai san great solution, I´ve spent the whole afternoon trying to figure out a solution. Thanks for sharing. |
@takayukisakai |
CSS override worked for me, posted my answer on stackoverflow |
@ajoslin have you actually be able to use hide-tabs. If so how is it used? I see a lot of people asking about it here and not really any answers. |
This feature was recently added for 1.2: 7dd620d#diff-8abac3f87d0ad8499e65128ece9dfd71R60 |
Thanks for the update @mlynch |
I forked the @takayukisakai codepen, using the ionic 1.3.0 version with the new |
@pietromarrone I try your codepen, but suppose we have a third level of navigation (after |
Actually I just extended another sample and both has that problem. No I Il Ven 5 Ago 2016 18:17 Benjamin Klups [email protected] ha
|
@ajoslin Thanks a lot! |
If your problem is on android, this could help you. In the ionic config.xml, add the following lines in the platform name="android" tag.
This will prevent the keyboard to push up everything and simple overlay the keyboard on the content. So the behaviour will be the same or similar to the ios keyboard |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
There might be a case where someone would like to hide the tab bar.
One instance i can think of is when the user focuses on any input element the screen shrinks to accommodate the keyboard and this causes the tab bar to be docked at the top of the keyboard.
The text was updated successfully, but these errors were encountered: