Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular 2 Material md-chips color attribute not working

When i try to style my md-chips with the color attribute nothing happens. According to the guide https://material.angular.io/components/component/chips this has to work. All my other elements style without problems.

<md-chip-list>
    <md-chip color="primary"> Chicken </md-chip>
    <md-chip color="warn"> Table </md-chip>
    <md-chip color="accent"> Tree </md-chip>
    <md-chip> Eight </md-chip>
</md-chip-list>

Result:enter image description here

Does anybody know how to fix this?

Thanks in advance!

like image 641
Peter Avatar asked Apr 12 '17 07:04

Peter


1 Answers

According to the plunkr example, the chips are only colored when the selected attribute is set to true :

<md-chip color="accent" selected="true">Chicken</md-chip>
like image 170
Riron Avatar answered Oct 14 '22 00:10

Riron