1
現在、ステップヘッダーには材料create
およびdone
アイコンを使用してユーザーがロックされています。これらの変更は、ng-template
にオーバーライドを指定することで、アイコンをカスタマイズする機能を追加します。 だから更新GITHUB を発見したが、私は角材2のマットステッパーのアイコンをカスタマイズする能力
`<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>`
としてそれを使用する場合場合、私は、このエラーに
Uncaught Error: Template parse errors:
'custom-icon' is not a known element:
1. If 'custom-icon' is an Angular component, then verify that it is part of this module.
2. If 'custom-icon' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
どのように私は私の希望のアイコンを与えることができます
こんにちは@Aranganathanの代わりに使用している場合、それはあなたを助けると私もこんにちは – Enthu
お知らせくださいかもしれません@ Unnikrishnan MRさんは、マットステッパーヘッダーのアイコンと背景色をどのように変更することができますか – Enthu