Kondal Kondal -3 years ago 160
AngularJS Question

How to set Angular Material default icon set

<material-icon icon = "datas/icons/logo.svg"> </material-icon>


Its not working..

I guess there is a problem with the path given as parameter to the the icon attribute. Would like to know where this icon folder actually is. (BTW I am using bower to download the packages)

Answer Source

I think there is a more simpler way to use material icons and this is how I use them.

<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<i class="material-icons">face</i> 

/* Rules for sizing the icon. */
.material-icons.md-18 { font-size: 18px; }
.material-icons.md-24 { font-size: 24px; }
.material-icons.md-36 { font-size: 36px; }
.material-icons.md-48 { font-size: 48px; }

/* Rules for using icons as black on a light background. */
.material-icons.md-dark { color: rgba(0, 0, 0, 0.54); }
.material-icons.md-dark.md-inactive { color: rgba(0, 0, 0, 0.26); }

/* Rules for using icons as white on a dark background. */
.material-icons.md-light { color: rgba(255, 255, 255, 1); }
.material-icons.md-light.md-inactive { color: rgba(255, 255, 255, 0.3); }
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<i class="material-icons">face</i>

<i class="material-icons md-18">face</i>
<i class="material-icons md-24">face</i>
<i class="material-icons md-36">face</i>
<i class="material-icons md-dark">face</i>
<i class="material-icons md-dark md-inactive">face</i>

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download