Search code examples
angularangular-materialicons

Mat-icon does not show icon


I love angular material's design, but using it can be a pain. The site shows an example using

<mat-icon>home</mat-icon>

However, when I do the same thing in my project, I just see the text "home".

I don't see where I need to do anything other than import MatIconModule.

Does anyone have a clue?

I'm using angular material v8.0.1. I also installed material-design-icons v 3.0.1. and have this in my index.html. (i did one at a time)

<link rel="stylesheet" href="https://storage.googleapis.com/non-spec-apps/mio-icons/latest/outline.css">

Solution

  • You need remove

    <link rel="stylesheet" href="https://storage.googleapis.com/non-spec-apps/mio-icons/latest/outline.css">
    

    and change to

    <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">