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

md-basic-chip gets mat-chip class when using [class]="myClass" #4437

Closed
sabithpocker opened this issue May 8, 2017 · 2 comments
Closed

md-basic-chip gets mat-chip class when using [class]="myClass" #4437

sabithpocker opened this issue May 8, 2017 · 2 comments

Comments

@sabithpocker
Copy link

Bug

What is the expected behavior?

<md-basic-chip [class]="color">I'm basic </md-basic-chip> should remain un-styled even if we add custom class using [class]="myClass"

What is the current behavior?

<md-basic-chip [class]="color">I'm basic but got an unwanted style :(</md-basic-chip> changes to md-chip style if we add custom class using [class]="myClass" by adding an extra mat-chip class.

What are the steps to reproduce?

Plunker Link

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

To have custom styled rectangular chips without margins with different colors depending on their type ( repeated by *ngFor )

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

material : 2.0.0-beta.3
angular  : 4.0.0
OS: Mac OS Sierrs
Browser: All

Is there anything else we should know?

I don't know if this the correct way to add classes to <md-basic-chip>.

@sabithpocker sabithpocker changed the title md-basic-chip gets mat-chip class when using [class]="myClass" md-basic-chip gets mat-chip class when using [class]="myClass" May 8, 2017
@sabithpocker
Copy link
Author

Not an issue actually, should have used ngClass.

Fixed by using <md-basic-chip [ngClass]="color">I'm basic </md-basic-chip>

@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.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant