How do I use a font-awesome icon with the Knob button?

4

In the Angular Material documentation there are examples of how to use icons in buttons through an SVG icon. / p>

Example:

  <md-button class="md-icon-button md-primary" aria-label="Settings">
    <md-icon md-svg-icon="img/icons/menu.svg"></md-icon>
  </md-button>

But I'd like to know if there's any way to use font icons as well. In my case I'm using Font Awesome .

How to do this?

    
asked by anonymous 14.02.2017 / 16:19

1 answer

3

I do not remember seeing anything about this in the documentation, but to use a font as an icon, you need to use the md-icon directive with the md-font-icon property containing the icon class (in your case icons of Awesome Font).

See:

<md-button class="md-icon-button">
    <md-icon md-font-icon="fa fa-edit"></md-icon>
</md-button>
    
14.02.2017 / 16:19