I am creating an angular application which has mat stepper with 4 steps. User has to complete the steps one by one. Only if he completes the form in first step he can go to next step by clicking on the button in the form not by clicking on stepper label. After completing the steps he can still visit all the completed steps by clicking on the stepper label . I know this can be achieved with linear and completed attributes and lot of examples are available .
Scenario is if the user completed till step 4 and he goes back to step 2 , change anything in the form of second step then step 3 and step 4 has to be disabled (even though it is completed it has to become disabled and non editable and user has to navigate via the buttons only like in the beginning). Is it possible to achieve this in mat stepper ?
Not sure it's exact answer you want but give it a try.
You can get index of every mat step header and apply logic according to it.
component.html
component.ts
or
You can just prevent user by clicking on label so user can't go to steps via header
In component.ts
In css
Here is the example of both ideas
stackblitz