I'm trying to use Outlined material icons in my app. I can't seem to properly import them. I can only use the noramal filled icons. I want to be able to use outlined icons like this example.
In the example I can use the done_outline
Icon. How did they import all of the icons?
In my app I installed npm install material-design-icons
and I have imported MatIconModule
in my app.module.ts
but I still can't use any outline icons.
You have two solutions.
1) First solution.
<link href="https://fonts.googleapis.com/icon?family=Material+Icons"
rel="stylesheet">
Or outline version :
<link href="https://fonts.googleapis.com/icon?family=Material+Icons+Outlined"
rel="stylesheet">
<i class="material-icons">face</i>
2) Solution with material package
npm install @angular/material
import {MatIconModule} from '@angular/material/icon';
<mat-icon>face</mat-icon>
Demo :
https://stackblitz.com/edit/angular-psj1hy
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With