You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: ion-tab-bar slot not working with Angular binding #19484
changed the title [-]Tab bar slot position does not work with a variable[/-][+]bug: Tab bar slot position does not work with a variable[/+]on Sep 28, 2019
changed the title [-]bug: Tab bar slot position does not work with a variable[/-][+]bug: ion-tab-bar slot not working with Angular binding[/+]on Oct 2, 2019
The reason binding doesn't work:
Basically the <ion-tabs> element is a flexbox with flex-direction: column,
Inside this, there are two elements: the <ion-tab-bar> and a div with the class tabs-inner
If slot="top" is set, then the tab-bar will be placed first inside the ion-tabs with the tabs-inner div below it, and vica versa for slot="bottom".
When you change the value of slot, nothing happens, the elements remain in the same order in the document.
My workaround:
when you want the tab-bar at the top, change the css order value
to -1
css:
.top-menu {
// this tells the flex container to place this item first
order: -1;
}
It may not be relevant to others, but still posting it here. This may help someone.
I generated my ionic solution using aws-amplify and after spending few hours I found that "~@aws-amplify/ui-angular/theme.css" is causing the issue with slot 'bottom' ().
After removing the theme ui-angular/theme.css import everthig works fine.
Note: If some of your app components are using the style from "~@aws-amplify/ui-angular/theme.css" then you may need to apply some custom CSS on them.
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.
Activity
[-]bug: [/-][+]Tab bar slot position does not work with a variable[/+][-]Tab bar slot position does not work with a variable[/-][+]bug: Tab bar slot position does not work with a variable[/+][-]bug: Tab bar slot position does not work with a variable[/-][+]bug: ion-tab-bar slot not working with Angular binding[/+]Muji86 commentedon Apr 28, 2020
Was there a solution to this?
jsandler18 commentedon May 18, 2020
+1 I am also experiencing this issue.
phiamo commentedon Jun 26, 2020
same issue here
razfriman commentedon Jul 11, 2020
Same
arramanenka commentedon Sep 10, 2020
Same
Ross-Rawlins commentedon Nov 16, 2020
Same
gr99t commentedon Feb 16, 2021
Still an issue in 5.5.4
As a workaround I am binding a CSS class to the ion-tab-bar:
CSS:
Blamax commentedon Feb 21, 2021
unfortunately, this messes with other bars due to absolute positioning.
juanAFernandez commentedon Jul 29, 2021
Same problem. A simple nasty workaround, duplicate the code (one with
bottomand the other one withtopand add a*ngIf.Saqib92 commentedon Aug 16, 2021
Still facing this issue.
Abrarss commentedon Nov 24, 2021
still facing the same issue
gongAll commentedon Dec 27, 2021
a lot of people are commenting this issue.
PLEASE bump it instead of commenting it so that it goes up on the priority list.
Cheers.
EarlTilluck commentedon Mar 13, 2022
The reason binding doesn't work:
Basically the
<ion-tabs>element is a flexbox withflex-direction: column,Inside this, there are two elements: the
<ion-tab-bar>and a div with the classtabs-innerIf
slot="top"is set, then the tab-bar will be placed first inside theion-tabswith thetabs-innerdiv below it, and vica versa forslot="bottom".When you change the value of slot, nothing happens, the elements remain in the same order in the document.
My workaround:
when you want the tab-bar at the top, change the css order value
to -1
css:
html
This method keeps the original design format and should not lead to conflicts elsewhere.
gog1withme commentedon Jul 3, 2022
It may not be relevant to others, but still posting it here. This may help someone.
I generated my ionic solution using aws-amplify and after spending few hours I found that "~@aws-amplify/ui-angular/theme.css" is causing the issue with slot 'bottom' ().
After removing the theme ui-angular/theme.css import everthig works fine.
Note: If some of your app components are using the style from "~@aws-amplify/ui-angular/theme.css" then you may need to apply some custom CSS on them.
sean-perkins commentedon Jun 1, 2023
Hello everyone 👋
Here is a dev-build to experiment with, if anyone would like to test:
fix(angular): tabs supports conditional slot bindings (#27582)
liamdebeasi commentedon Jun 7, 2023
Thanks for the report. This has been resolved via #27582, and a fix will be available in an upcoming minor release of Ionic Framework.
ionitron-bot commentedon Jul 7, 2023
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.