Looking at a nested Angular Material Stepper, the label position in the child stepper (labelPosition="end"
) gets overwritten by the label position in the parent stepper (labelPosition="bottom"
), as in the following example:
<mat-horizontal-stepper labelPosition="bottom" linear #stepper>
<mat-step [stepControl]="firstFormGroup" [editable]="isEditable">
<ng-template matStepLabel>ParentLabel</ng-template>
<mat-horizontal-stepper labelPosition="end" linear #stepperChild>
<mat-step [stepControl]="firstFormGroup" [editable]="isEditable">
<form [formGroup]="firstFormGroup">
<ng-template matStepLabel>ChildLabel</ng-template>
<mat-form-field>
<mat-label>Name</mat-label>
<input matInput
formControlName="firstCtrl"
placeholder="Last name, First name"
required
/>
</mat-form-field>
</form>
</mat-step>
</mat-horizontal-stepper>
</mat-step>
</mat-horizontal-stepper>
Here's a Stackblitz showcasing the issue. Is there a way around this?