Angular 能够自定义角材质中matstepper中的图标2

Angular 能够自定义角材质中matstepper中的图标2,angular,angular-material,Angular,Angular Material,目前,用户被锁定使用步骤标题的材质create和done图标。这些更改通过提供带有覆盖的ng模板,增加了自定义图标的能力。 所以我找到了 但当我把它当作 <mat-horizontal-stepper [linear]="isLinear"> <mat-step [stepControl]="firstFormGroup"> <form [formGroup]="firstFormGroup"> <ng-template matS

目前,用户被锁定使用步骤标题的材质
create
done
图标。这些更改通过提供带有覆盖的
ng模板
,增加了自定义图标的能力。 所以我找到了 但当我把它当作

<mat-horizontal-stepper [linear]="isLinear">
  <mat-step [stepControl]="firstFormGroup">
    <form [formGroup]="firstFormGroup">
      <ng-template matStepLabel>Fill out your name</ng-template>
      <ng-template matStepperIcon="edit">
        <custom-icon>edit</custom-icon>
       </ng-template>
      <mat-form-field>
        <input matInput placeholder="Last name, First name" formControlName="firstCtrl" required>
      </mat-form-field>
      <div>
        <button mat-button matStepperNext>Next</button>
      </div>
    </form>
  </mat-step>
  <mat-step>
    <ng-template matStepLabel>Done</ng-template>
    You are now done.
    <div>
      <button mat-button matStepperPrevious>Back</button>
    </div>
  </mat-step>
</mat-horizontal-stepper>
我怎样才能给出我想要的图标呢

如果已安装,请在模块中添加导入

import {MatIconModule} from '@angular/material/icon';
@NgModule({
   imports: [
     MatIconModule
]
})
如果已导入,请使用而不是


检查
第1步内容
第2步内容
步骤3内容

Hi@Aranganathan有一个自定义图标的更新,它可能会帮助您,请让我也知道Hi@Unnikrishnan M R您能告诉我如何更改mat stepper Header的图标和背景色吗?现在官方文档使用的是不起作用的图标,而不是实际起作用的!谢谢
import {MatIconModule} from '@angular/material/icon';
@NgModule({
   imports: [
     MatIconModule
]
})
<mat-vertical-stepper>
    <ng-template matStepperIcon="edit">
            <mat-icon>check</mat-icon>
    </ng-template>
   <!-- Stepper steps go here -->
   <mat-step label="step 1">step 1 content</mat-step>
   <mat-step label="step 2">step 2 content</mat-step>
   <mat-step label="step 3">step 3 content</mat-step>
</mat-vertical-stepper>