3
3
< h3 > Linear Vertical Stepper Demo using a single form</ h3 >
4
4
< form [formGroup] ="formGroup ">
5
5
< mat-vertical-stepper #linearVerticalStepper ="matVerticalStepper " formArrayName ="formArray " [linear] ="!isNonLinear ">
6
- < mat-step
7
- formGroupName ="0 "
8
- [stepControl] ="formArray?.get([0]) "
9
- errorMessage ="Some fields are required "
10
- [completed] ="true "
11
- >
6
+ < mat-step formGroupName ="0 " [stepControl] ="formArray?.get([0]) ">
12
7
< ng-template matStepLabel > Fill out your name</ ng-template >
13
8
< mat-form-field >
14
9
< mat-label > First name</ mat-label >
@@ -26,13 +21,7 @@ <h3>Linear Vertical Stepper Demo using a single form</h3>
26
21
</ div >
27
22
</ mat-step >
28
23
29
- < mat-step
30
- formGroupName ="1 "
31
- [stepControl] ="formArray?.get([1]) "
32
- optional
33
- errorMessage ="The input is invalid "
34
- [showError] ="true "
35
- >
24
+ < mat-step formGroupName ="1 " [stepControl] ="formArray?.get([1]) " optional >
36
25
< ng-template matStepLabel >
37
26
< div > Fill out your email address</ div >
38
27
</ ng-template >
@@ -109,7 +98,7 @@ <h3>Linear Horizontal Stepper Demo using a different form for each step</h3>
109
98
< h3 > Vertical Stepper Demo</ h3 >
110
99
< mat-checkbox [(ngModel)] ="isNonEditable "> Make steps non-editable</ mat-checkbox >
111
100
< mat-vertical-stepper >
112
- < mat-step [editable] ="!isNonEditable " [completed] =" false " >
101
+ < mat-step [editable] ="!isNonEditable ">
113
102
< ng-template matStepLabel > Fill out your name</ ng-template >
114
103
< mat-form-field >
115
104
< mat-label > First name</ mat-label >
@@ -125,7 +114,7 @@ <h3>Vertical Stepper Demo</h3>
125
114
</ div >
126
115
</ mat-step >
127
116
128
- < mat-step [editable] ="!isNonEditable " [completed] =" false " >
117
+ < mat-step [editable] ="!isNonEditable ">
129
118
< ng-template matStepLabel >
130
119
< div > Fill out your phone number</ div >
131
120
</ ng-template >
@@ -139,7 +128,7 @@ <h3>Vertical Stepper Demo</h3>
139
128
</ div >
140
129
</ mat-step >
141
130
142
- < mat-step [editable] ="!isNonEditable " [completed] =" false " >
131
+ < mat-step [editable] ="!isNonEditable ">
143
132
< ng-template matStepLabel >
144
133
< div > Fill out your address</ div >
145
134
</ ng-template >
@@ -153,7 +142,7 @@ <h3>Vertical Stepper Demo</h3>
153
142
</ div >
154
143
</ mat-step >
155
144
156
- < mat-step [editable] =" !isNonEditable " [completed] =" false " >
145
+ < mat-step >
157
146
< ng-template matStepLabel > Confirm your information</ ng-template >
158
147
Everything seems correct.
159
148
< div >
@@ -234,64 +223,3 @@ <h3>Stepper with autosize textarea</h3>
234
223
</ mat-step >
235
224
</ mat-horizontal-stepper >
236
225
237
- < h3 > Stepper with customized state</ h3 >
238
- < mat-horizontal-stepper [linear] ="true ">
239
- < mat-step label ="Step 1 " state ="shopping_cart ">
240
- < p > Go to your shopping cart.</ p >
241
- < div >
242
- < button mat-button matStepperNext > Next</ button >
243
- </ div >
244
- </ mat-step >
245
- < mat-step label ="Step 2 " state ="credit_card ">
246
- < p > Enter your credit card information.</ p >
247
- < div >
248
- < button mat-button matStepperPrevious > Back</ button >
249
- < button mat-button matStepperNext > Next</ button >
250
- </ div >
251
- </ mat-step >
252
- < mat-step label ="Step 3 " state ="receipt ">
253
- < p > Get your receipt.</ p >
254
- < div >
255
- < button mat-button matStepperPrevious > Back</ button >
256
- < button mat-button matStepperNext > Next</ button >
257
- </ div >
258
- </ mat-step >
259
- < mat-step label ="Step 4 " state ="print ">
260
- < p > Print your receipt.</ p >
261
- < div >
262
- < button mat-button matStepperPrevious > Back</ button >
263
- < button mat-button matStepperNext > Next</ button >
264
- </ div >
265
- </ mat-step >
266
- < mat-step label ="Step 5 ">
267
- < p > You've successfully completed your purchase!</ p >
268
- </ mat-step >
269
- </ mat-horizontal-stepper >
270
-
271
- < h3 > Stepper with customized state with icon overrides</ h3 >
272
- < mat-horizontal-stepper [linear] ="true ">
273
- < mat-step label ="Step 1 " state ="phone ">
274
- < p > Put down your phones.</ p >
275
- < div >
276
- < button mat-button matStepperNext > Next</ button >
277
- </ div >
278
- </ mat-step >
279
- < mat-step label ="Step 2 " state ="chat ">
280
- < p > Socialize with each other.</ p >
281
- < div >
282
- < button mat-button matStepperPrevious > Back</ button >
283
- < button mat-button matStepperNext > Next</ button >
284
- </ div >
285
- </ mat-step >
286
- < mat-step label ="Step 3 ">
287
- < p > You're welcome.</ p >
288
- </ mat-step >
289
-
290
- <!-- Icon overrides. -->
291
- < ng-template matStepperIcon ="phone ">
292
- < mat-icon > call_end</ mat-icon >
293
- </ ng-template >
294
- < ng-template matStepperIcon ="chat ">
295
- < mat-icon > forum</ mat-icon >
296
- </ ng-template >
297
- </ mat-horizontal-stepper >
0 commit comments