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

ngclass with breakpoints doesn't remove class once added. #967

Closed
lokeshdaiya opened this issue Jan 3, 2019 · 6 comments
Closed

ngclass with breakpoints doesn't remove class once added. #967

lokeshdaiya opened this issue Jan 3, 2019 · 6 comments

Comments

@lokeshdaiya
Copy link

lokeshdaiya commented Jan 3, 2019

Bug Report

What is the expected behavior?

When ngClass is used with breakpoint then it should add specified class for that breakpoint and remove once breakpoint changes

for below example
[ngClass.xs] = "'test'"

it should add test class only for xs breakpoint . If breackpoint changes then it should remove that class.

What is the current behavior?

ngClass is not removing class when screen size changes.

What are the steps to reproduce?

Have a look on below stackblitz.
https://stackblitz.com/edit/angular-jau3sq

Try to resize the screen and observe behavior. You will notice test class is not getting removed when you go from xs to larger size.

What is the use-case or motivation for changing an existing behavior?

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Angular 7+
flex-layout 7.0.0-beta22

Is there anything else we should know?

It was working fine till 7.0.0-beta.19

@CaerusKaru
Copy link
Member

I feel like this is a duplicate of #947. Can you pull the latest nightly branch (npm i angular/flex-layout-builds, no @) and test to see if it's resolved?

@CaerusKaru
Copy link
Member

Closing with no response. I think this has been patched in beta 23. If this isn’t the case, we can reopen this.

@mhosman
Copy link

mhosman commented Jan 14, 2019

Still not working with ^7.0.0-beta.23

@lincolngup
Copy link

It's not working in 7.0.0-beta.23 for me, either. With the code below, the class document-margin is correctly added as the window size increases past sm (starting with an xs or sm window). But the class is not removed as the window size is then reduced to sm and xs screens.
ngClass.gt-sm="document-margin"

@sebastiangug
Copy link

idk why this was closed -- this still does NOT work.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants