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 behavior change after latest nightly #428

Closed
naveedahmed1 opened this issue Sep 22, 2017 · 2 comments · Fixed by #431
Closed

ngClass behavior change after latest nightly #428

naveedahmed1 opened this issue Sep 22, 2017 · 2 comments · Fixed by #431

Comments

@naveedahmed1
Copy link

naveedahmed1 commented Sep 22, 2017

With latest release the below code is working perfectly:

<button mat-raised-button color="primary" type="submit" [ngClass]="{'btn-xs':formButtonXs}">Save</button>

But with latest nightly build, it no longer seems to work.

When value of formButtonXs is true the button has below classes:

mat-primary btn-xs

When value of formButtonXs is false the button has just below class:

mat-primary

Expected behavior

It should have mat-raised-button mat-primary when formButtonXs is false whereas, mat-raised-button mat-primary btn-xs when formButtonXs is true

@robisim74
Copy link

Same problem here. Using ngClass, all material classes are removed.

ThomasBurleson added a commit that referenced this issue Sep 27, 2017
ClassDirective should work properly with `class` and `ngClass` usages; and only
instantiate when responsive APIs are used.

Fixes #428.
ThomasBurleson added a commit that referenced this issue Sep 27, 2017
ClassDirective should work properly with `class` and `ngClass` usages; and only
instantiate when responsive APIs are used.

* Add test that use @angular/material MdButtonModule md-raised-button
* Update to use latest @angular/material Beta.11

Fixes #428.
ThomasBurleson added a commit that referenced this issue Sep 27, 2017
ClassDirective should work properly with `class` and `ngClass` usages; and only
instantiate when responsive APIs are used.

* Add test that use @angular/material MdButtonModule md-raised-button
* Update to use latest @angular/material Beta.11

Fixes #428.
@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 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants