How to set the color of an icon in Angular Material?

后端 未结 7 1763
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-04 23:48

I have this, which I would assume to work, but doesn\'t:

home
         


        
7条回答
  •  不要未来只要你来
    2021-02-05 00:06

    color="white" is not a known attribute to Angular Material.

    color attribute can changed to primary, accent, and warn. as said in this doc

    your icon inside button works because its parent class button has css class of color:white, or may be your color="accent" is white. check the developer tools to find it.

    By default, icons will use the current font color

提交回复
热议问题