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

*HideIfNot and *ShowIfNot feature #93

Open
acidpops9 opened this issue Oct 6, 2017 · 3 comments
Open

*HideIfNot and *ShowIfNot feature #93

acidpops9 opened this issue Oct 6, 2017 · 3 comments
Labels

Comments

@acidpops9
Copy link

acidpops9 commented Oct 6, 2017

Is there a *HideIfNot and *ShowIfNot feature or something that can work similar to it ?

Scenario:
I'm trying to get a div section to show only when the user is on "Chrome, Firefox, Edge or IE11".
Anything else it will hide and show another div saying they should only use the specified browser.

Any idea if this is possible?

Thanks.

@ghost
Copy link

ghost commented Oct 16, 2017

This library hides or shows elements based on media queries or browser detection, it's the entire purpose. You're asking for a feature that basically defines it.

@acidpops9
Copy link
Author

Yes I am aware that the library has a "Hide If" and "Show If" feature.
However, what I'm asking for is an enhancement by having "If Not" being supported.

@ImranAhmed
Copy link

The API is not clear. It needs a negation or else statement.

For example I should be able to do this.

in my .ts file I have the following variable

supportedPlatform = {
browser: ['chrome'],
device: 'desktop'
};

In my template file I should then be able to show an element based on the supportedPlatform variable and an element based on the negation of the supportedPlatform variable too i.e. everything that is not chrome/desktop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants