Trying this one but not working
::ng-deep .mat-horizontal-stepper-header .mat-step-icon-content:nth-child(1)::after {
content: 'A';
}
::ng-deep .mat-horizontal-stepper-header .mat-step-icon-content:nth-child(2)::after {
content: 'B';
}
::ng-deep .mat-horizontal-stepper-header .mat-step-icon-content:nth-child(3)::after {
content: 'C';
}
::ng-deep .mat-horizontal-stepper-header .mat-step-icon-content:nth-child(4)::after {
content: 'D';
}
ITs giving A1 A2 A3 A4 but it should give A B C D
Try to avoid using
::ng-deep
. It's deprecated.You can solve your problem by using custom
<ng-template>
elements. Just define your custommatStepperIcon
(see documentation) for thenumber
.Create a stepper with the custom
ng-templpate
as follows:Via
let-index="index"
you can access the index of the current step. In this example I created a simple method for the text in thecomponent.ts
like this: