How to use Material Icons Symbols with Angular?

Discussão em 'Angular' iniciado por Ole, Fevereiro 24, 2025.

  1. Ole

    Ole Guest

    How do we set the fontSet attribute on MatIcon in order to get the Material Symbols to render.

    I'm trying to render the expand_content symbol however it is not rendering as shown in the material icons font.

    This is the markup for rendering it as a span element:

    <span class="material-symbols-outlined">
    expand_content
    </span>


    This is how Angular Renders it: https://stackblitz.com/edit/stackblitz-starters-lgahav?file=src/main.ts,src/index.html

    This is the markup:

    <mat-icon fontSet="material-icons-outlined">expand_content</mat-icon>



    And this is the icon I'm trying to render.

    [​IMG]

    Continue reading...

Compartilhe esta Página