Comments (13)
@paistipoikka - The Plunkr is not working because you discovered a pre-Beta bug ;-).
from flex-layout.
<div id="sideBar" fxLayout="column" fxFlex="202px" fxShow="{{sideBarOpen?'true':'false'}}"> export class MainpageComponent implements OnInit { sideBarOpen: boolean = true; private sideControlToggle() { this.sideBarOpen = !this.sideBarOpen; } }
Good luck to you.....
from flex-layout.
Please provide a CodePen or Plunkr that demonstrates the issue. Here is a Plunkr template
from flex-layout.
The API has changed (and all the docs):
fx-layout
should befxLayout
fx-show
should befxShow
Here is a your Code Plunkr demonstrating the issue.
from flex-layout.
Thanks for coming back so quickly. The toggle was happening up in the form using the '!' in toggleMenu(!menuOpen).
It seems the button in the Plunkr is not working either. fxShow is reading the property. Just not showing anything.
import {Component} from '@angular/core'
@Component({
selector: 'test-app',
template: `
<button class="nav-trigger"
(click)="toggleMenu()"
color="primary"
md-icon-button>
Toggle Button
</button>
<div fxLayout="row"
[fxShow]="menuOpen"
fxShow.xs="true"
style="margin-top:25px;background-color:#d9edf7">
I should hide and show
</div> `,
})
export class TestApp {
private _menuOpen: boolean = true;
toggleMenu(show: boolean) {
this.menuOpen = !this.menuOpen;
}
set menuOpen(_menuOpen: boolean) {
console.log(_menuOpen);
return this._menuOpen = _menuOpen;
}
get menuOpen(): boolean {
console.log(this._menuOpen);
return this._menuOpen;
}
}
from flex-layout.
@paistipoikka - see the fxShow & fxHide working here:
from flex-layout.
@ThomasBurleson That's not working in the Plunkr.
from flex-layout.
@paistipoikka - It is working now... just make sure the result view pane is > xs
viewport size.
from flex-layout.
Nice! 👍
from flex-layout.
I'm using angular 2.1.0 and flex-layout alpha and we can't upgrade because we've started using https://github.com/qdouble/angular-webpack2-starter
so now fx-layout & fx-flex works but fxShow & fxHide don't
<div [fxShow]="menuOpen"
fxShow.xs="true"
style="margin-top:25px;background-color:#d9edf7">
I should hide and show
</div>
return this error
"Uncaught (in promise): Error: Template parse errors:
Can't bind to 'fxShow' since it isn't a known property of 'div'"
from flex-layout.
@fdambrosio - please report a new issue.
from flex-layout.
@ThomasBurleson I have Angular latest version 6.1.2 and fxHide and fxShow are not working.
from flex-layout.
@SamiHK If this is still a problem, please open a new issue with a demo and/or minimal reproduction.
from flex-layout.
Related Issues (20)
- Support for Angular14 HOT 4
- fxLayoutGap="10px 20px grid" - alternative axis value and grid not working? HOT 1
- Issue when upgrading project from angular v13 to v14 HOT 2
- Conflicting peer dependency on 14.0.0-beta.39 HOT 3
- DirectiveDeclaration' requires 6 type argument(s). HOT 1
- Is there any dependency when mat-action-row tag is involved?? HOT 1
- How outdated are the DOCS? HOT 2
- my Etisalat HOT 2
- Angular 14 - error TS2420: Class 'MockMediaQueryList' incorrectly implements interface 'MediaQueryList'. Property 'prototype' is missing in type 'MockMediaQueryList' but required in type 'MediaQueryList'. HOT 25
- Angular Layout Migration Guides HOT 103
- Demo code link borken, demo page outdated HOT 2
- Support for Angular 15 HOT 17
- Status angular 15 HOT 6
- Alternative for FlexLayout Lib after dropped support v15+ HOT 11
- Why not continue flex-layout development with a community maintained fork? HOT 23
- Angular 15 Support HOT 8
- Angular 15 Pull request status HOT 4
- Archive the project in github HOT 2
- Why is this discontinued? HOT 2
- flex-layout Should support angular 16 version HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flex-layout.