angularcolorsmd-chip

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!


Solution

  • 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>