Coder Social home page Coder Social logo

Comments (13)

ThomasBurleson avatar ThomasBurleson commented on May 22, 2024 1

@paistipoikka - The Plunkr is not working because you discovered a pre-Beta bug ;-).

from flex-layout.

IK-Hwan avatar IK-Hwan commented on May 22, 2024 1
 <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.

ThomasBurleson avatar ThomasBurleson commented on May 22, 2024

Please provide a CodePen or Plunkr that demonstrates the issue. Here is a Plunkr template

from flex-layout.

ThomasBurleson avatar ThomasBurleson commented on May 22, 2024

The API has changed (and all the docs):

  • fx-layout should be fxLayout
  • fx-show should be fxShow

Here is a your Code Plunkr demonstrating the issue.

from flex-layout.

jt-helsinki avatar jt-helsinki commented on May 22, 2024

Hi @ThomasBurleson

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.

ThomasBurleson avatar ThomasBurleson commented on May 22, 2024

@paistipoikka - see the fxShow & fxHide working here:

from flex-layout.

jt-helsinki avatar jt-helsinki commented on May 22, 2024

@ThomasBurleson That's not working in the Plunkr.

from flex-layout.

ThomasBurleson avatar ThomasBurleson commented on May 22, 2024

@paistipoikka - It is working now... just make sure the result view pane is > xs viewport size.

from flex-layout.

jt-helsinki avatar jt-helsinki commented on May 22, 2024

Nice! 👍

from flex-layout.

fdambrosio avatar fdambrosio commented on May 22, 2024

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.

ThomasBurleson avatar ThomasBurleson commented on May 22, 2024

@fdambrosio - please report a new issue.

from flex-layout.

SamiHK avatar SamiHK commented on May 22, 2024

@ThomasBurleson I have Angular latest version 6.1.2 and fxHide and fxShow are not working.

from flex-layout.

CaerusKaru avatar CaerusKaru commented on May 22, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.