Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split pane combined condition for screens size and boolean #10949

Closed
basvdijk opened this issue Mar 28, 2017 · 8 comments
Closed

Split pane combined condition for screens size and boolean #10949

basvdijk opened this issue Mar 28, 2017 · 8 comments
Assignees

Comments

@basvdijk
Copy link

Ionic version: (check one with "x")
[ ] 1.x
[X] 2.x

I'm submitting a ... (check one with "x")
[ ] bug report
[X] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/

Current behavior:
I have an observable in my accountService called isAuthenticated$. The sidemenu contains options only available when the user is logged in.

Currently it is only possible to add a boolean on the when:

<ion-split-pane [when]="account.isAuthenticated$ | async">

However this results in showing the sidemenu even when the user is on a small screen.

<ion-split-pane when="lg">

Also works but then I miss the authenticated check.

Expected behavior:
A combination of screen size and using a boolean value

@jgw96
Copy link
Contributor

jgw96 commented Mar 28, 2017

Hello @basvdijk thanks for opening an issue with us , what value does your account.isAuthenticated$ observable emit? Is it a boolean value?

@basvdijk
Copy link
Author

@jgw96 Yes it is a boolean

@basvdijk
Copy link
Author

basvdijk commented Apr 7, 2017

Great it is fixed but what will be the correct syntax? Will it be:

<ion-split-pane [when]="account.isAuthenticated$ | async" when="lg">

@vdias38
Copy link

vdias38 commented Oct 26, 2017

Hi @basvdijk, I have the same issue which syntax do you use to combine boolean and screen size ?

@basvdijk
Copy link
Author

@elbidone <ion-split-pane [when]="account.isAuthenticated$ | async" when="lg"> seems to work now

@vdias38
Copy link

vdias38 commented Oct 26, 2017

thanks @basvdijk

@lolaswift
Copy link

@basvdijk this isn't working for me when used together.

@ionitron-bot
Copy link

ionitron-bot bot commented Sep 1, 2018

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.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants