fxShow not working
Hey, I tried to use fxShow in one of your examples and it doesn't seem to be working properly. fxHide works when I do:
fxHide.xs="true"
but fxShow doesn't work when I do:
fxShow.gt-xs="true"
<button class="nav-trigger"
(click)="toggleMenu()"
color="primary"
md-icon-button>
Toggle Button
</button>
<div [fxShow]="menuOpen"
fxShow.xs="true"
style="margin-top:25px;background-color:#d9edf7">
I should hide and show
</div>
See the same issue with next markup:
<span fxShow [fxShow.gt-xs]="true">Visible on desktop</span>
Do I use it right? Btw @whyao your code looks different to documentation.
Next code is working:
<span fxHide [fxHide.gt-xs]="false">Visible on desktop</span>
I think there's some confusion in documentation language or need more examples...
Explanation for example above: fxHide will hide element for all sizes, [fxHide.gt-xs]="false" will not hide element for gt-xs. Rules applied from left to right, following rules overrides previous ones.
Opposite example:
<span fxShow [fxShow.gt-xs]="false">Visible on mobile</span>
I think all is working btw, not a bug. @ThomasBurleson can you confirm?
@whyao - this is working with the latest code in HEAD (on master).
- Working Plunkr
- Do not use
FlexLayoutModule.forRoot()... useFlexLayoutModule - To use the latest build code (pre-release), update your config
'@angular/flex-layout' : 'https://rawgit.com/angular/flex-layout-builds/master/bundles/flex-layout.umd.js'
- Do not use
NEW Wiki Documentation: fxShow/fxHide
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.