I am using Angular material stepper component in the following example stackblitz
and I am trying to change dynamically the default numbers of each step to material icons by changing the state of selector mat-step using table stepicons in ngoninit. Can anyone help me with this?
<mat-vertical-stepper (selectionChange)="selectionChanged($event)" [linear]="true" style="width:100%;height:100%">
<ng-template matStepperIcon="edit">
<mat-icon>done</mat-icon>
</ng-template>
<ng-template matStepperIcon="category">
<mat-icon>category</mat-icon>
</ng-template>
<ng-template matStepperIcon="apps">
<mat-icon>apps</mat-icon>
</ng-template>
<ng-template matStepperIcon="search">
<mat-icon>search</mat-icon>
</ng-template>
<mat-step *ngFor="let step of steps; let i = index" [label]="step.title" state="stepicons.text">
<router-outlet *ngIf="i === selectedStepIndex"></router-outlet>
<button mat-raised-button color="primary" matStepperNext
style="margin-top:10px; float: left;position: relative;">Επόμενο</button>
</mat-step>