fxShow and fxHide work, however, fxShow.gt-xs or any screen size for that matter doesn't work.
Here are the versions I'm working with.
"@angular/material": "^2.0.0-beta.1"
"@angular/flex-layout": "^2.0.0-beta.3"
These fixes are now in #master and will be available on npm with Beta.4 (coming soon).
See https://github.com/angular/flex-layout/pull/121 for details.
Ok thanks, I'll check the closed issues and master before creating an issue next time.
@tydanielson 馃憤 Thanks for getting involved with flex-layout!
@ThomasBurleson: I pulled down master and was able to get all the fxHide parts working, but when I tried to do <div fxShow.gt-sm></div> it didn't work. I took a look at the source and didn't see anything obvious, but it's going to take me some time to figure out what's going on. I do have a workaround, however, using <div fxHide.xs fxHide.sm></div> works like a champ.
@tydanielson - what did not work with <div fxShow.gt-sm></div> ?
Note that fxShow does not hide when-not-active/when-false. fxShow will only set the display to "flex" when true and resets original display mode when false.
You prolly want this:
<div style="display:none"
fxShow.gt-sm>
This content to be shown ONLY when gt-sm
</div>
Ah that makes sense... I didn't style it to not show by default. I guess my assumption would be that I wouldn't need to hide it first. I would expect it to have the display set depending on what screen size I initially pull open. If I open it in a mobile page, it would be first hidden by my setting it as display:none and then shown by the fxShow component which seems odd when fxShow could handle that for me. This is just my opinion of course.
Think of fxShow and fxHide as overrides. FxShow will override a hidden invisible to show it... fxHide will override to hide it.
We are working to allow the following::
<div fxHide
fxShow.gt-sm>
This content to be shown ONLY when gt-sm
</div>
^ is not yet working as expected.
fxHide fxShow.gt-sm this code is working great but not above one.. BTW thanks for this.
using:
"@angular/material": "^5.0.1" //latest
"@angular/flex-layout": "^2.0.0-beta.10-4905443",
@aloketewary - you have the wrong version of Flex-Layout installed; you need Beta.12
npm uninstall @angular/flex-layoutnpm install @angular/flex-layout --saveThen rebuild...
Most helpful comment
We are working to allow the following::