如何自定义角度材料md芯片颜色



我想在不使用css样式的情况下随机自定义md芯片颜色。md-chip指令中是否有任何属性?

<md-chips placeholder="Add more tags here"
                         secondary-placeholder="Enter tags here"  ng-model="contact.contact.tags.attrVal"  md-on-add="contact.createTag(contact.contact)" md-on-remove="contact.removeTag(contact.contact)"></md-chips>

你可以使用ng-style。

ng-style={background-color:'red'}

请参阅 Angular Material 的 github 上的问题 8692。这似乎是目前正在处理的已知问题。

最新更新