1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

Error retrieving icon: Unable to find icon with the name ":done"

Discussão em 'Angular' iniciado por Sandra Willford, Junho 19, 2025.

  1. This is my first time using Angular Material, I am having an issue with mat-icons.

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

    In my shared module, I have the icons imported:

    import { NgModule } from '@angular/core';
    import { CommonModule } from '@angular/common';
    import {
    MatButtonModule,
    MatCardModule,
    MatIconModule,
    MatMenuModule,
    MatToolbarModule,
    } from '@angular/material';

    @NgModule({
    imports: [
    CommonModule,
    MatButtonModule,
    MatCardModule,
    MatIconModule,
    MatMenuModule,
    MatToolbarModule
    ],
    exports: [
    MatButtonModule,
    MatCardModule,
    MatIconModule,
    MatMenuModule,
    MatToolbarModule
    ],
    declarations: []
    })
    export class SharedModule { }


    then I import the SharedModule into my LoginModule:

    import { NgModule } from '@angular/core';
    import { CommonModule } from '@angular/common';
    import { SharedModule } from '../../shared/shared.module';
    import { LoginRoutingModule } from './login.routing.module';
    import { LoginContainerComponent } from './login-container/login-container.component';
    import { LoginViewComponent } from './login-view/login-view.component';

    @NgModule({
    imports: [
    CommonModule,
    LoginRoutingModule,
    SharedModule
    ],
    declarations: [
    LoginContainerComponent,
    LoginViewComponent
    ]
    })

    export class LoginModule { }


    finally I go to use the mat-icon in the view:

    <mat-card>
    <mat-card-title-group>
    <mat-card-title>
    Welcome to Track-It
    </mat-card-title>
    <mat-card-subtitle>
    In order to use all of Track-it's goodness, please login...
    </mat-card-subtitle>
    </mat-card-title-group>
    <mat-card-content>
    Lorem, ipsum dolor sit amet consectetur adipisicing elit. Maxime quod labore autem. Sunt expedita ullam quis in deserunt rem eum, quas culpa quo aut eius consequuntur magni. Voluptates, mollitia ullam.
    </mat-card-content>
    <mat-card-actions [align]="'end'">
    <button mat-flat-button>
    Login&nbsp;
    <mat-icon svgIcon="done"></mat-icon>
    </button>
    </mat-card-actions>
    </mat-card>


    Hover with this I get the following error: Error retrieving icon: Unable to find icon with the name ":done"

    I am by no means new to Angular, but definately new to Angular Material, so not to sure what is happening here. What I have above should be working. Thoughts?

    Continue reading...

Compartilhe esta Página