[ad_1]
I wan to set active tab based on passed valule of index from API.
Here main problem is that i have must use linear="true"
, if i set linear="false"
than below code is work fine for me. But i can’t make linear="false"
.
HTML file
<mat-horizontal-stepper #stepperSupplier linear="true">
<mat-step>
Label 1
</mat-step>
<mat-step>
Label 2
</mat-step>
<mat-step>
Label 3
</mat-step>
<mat-step>
Label 4
</mat-step>
<mat-step>
Label 5
</mat-step>
</mat-horizontal-stepper>
TS file
@ViewChild('stepperSupplier') myStepperSupplier: MatStepper;
//API called and get value of this.activeStep = 2
this.myStepperSupplier.selectedIndex = this.activeStep;
I also try with this
<mat-horizontal-stepper #stepperSupplier linear="{{statusLinear}}">
and set statusLinear
value true and false based on condition but when i get and pass avlue false to statusLinear than false consition is not working.
Is there any way yo solve this?
[ad_2]