I am trying to create a progress wizard using angular material stepper. I get JSON data that looks like this:
{
"step":1,
"info":"this is some order data",
"status":true
},
{
"step":2,
"info":"this is some order data",
"status":true
},
{
"step":3,
"info":"this is some order data",
"status":false
}
If the status is true, then it should display green; if it's false, it should display grey color along with some info that I can display here. The stepper usually works with onlick only but I need it to work based on JSON status. Below is my code:
<mat-horizontal-stepper>
<mat-step label="Step 1">
Step 1 content
</mat-step>
<mat-step label="Step 2">
Step 2 content
</mat-step>
<mat-step label="Step 3">
You are now done.
</mat-step>
</mat-horizontal-stepper>
https://stackblitz.com/edit/angular-angular-material-stepper-p4zkqw