1
+ < h2 > Linear Vertical Stepper Demo</ h2 >
2
+ < md-checkbox [(ngModel)] ="isNonLinear "> Disable linear mode</ md-checkbox >
3
+ < form [formGroup] ="formGroup ">
4
+ < md-vertical-stepper formArrayName ="formArray " [linear] ="!isNonLinear ">
5
+ < md-step formGroupName ="0 " [stepControl] ="formArray.get([0]) ">
6
+ < ng-template mdStepLabel > Fill out your name</ ng-template >
7
+ < md-input-container >
8
+ < input mdInput placeholder ="First Name " formControlName ="firstNameFormCtrl " required >
9
+ < md-error > This field is required</ md-error >
10
+ </ md-input-container >
11
+
12
+ < md-input-container >
13
+ < input mdInput placeholder ="Last Name " formControlName ="lastNameFormCtrl " required >
14
+ < md-error > This field is required</ md-error >
15
+ </ md-input-container >
16
+ < div >
17
+ < button md-button mdStepperNext type ="button "> Next</ button >
18
+ </ div >
19
+ </ md-step >
20
+
21
+ < md-step formGroupName ="1 " [stepControl] ="formArray.get([1]) ">
22
+ < ng-template mdStepLabel >
23
+ < div > Fill out your phone number</ div >
24
+ </ ng-template >
25
+ < md-input-container >
26
+ < input mdInput placeholder ="Phone number " formControlName ="phoneFormCtrl ">
27
+ < md-error > This field is required</ md-error >
28
+ </ md-input-container >
29
+ < div >
30
+ < button md-button mdStepperPrevious type ="button "> Back</ button >
31
+ < button md-button mdStepperNext type ="button "> Next</ button >
32
+ </ div >
33
+ </ md-step >
34
+
35
+ < md-step >
36
+ < ng-template mdStepLabel > Confirm your information</ ng-template >
37
+ Everything seems correct.
38
+ < div >
39
+ < button md-button > Done</ button >
40
+ </ div >
41
+ </ md-step >
42
+ </ md-vertical-stepper >
43
+ </ form >
44
+
45
+ < h2 > Vertical Stepper Demo</ h2 >
46
+ < md-vertical-stepper >
47
+ < md-step >
48
+ < ng-template mdStepLabel > Fill out your name</ ng-template >
49
+ < md-input-container >
50
+ < input mdInput placeholder ="First Name ">
51
+ < md-error > This field is required</ md-error >
52
+ </ md-input-container >
53
+
54
+ < md-input-container >
55
+ < input mdInput placeholder ="Last Name ">
56
+ < md-error > This field is required</ md-error >
57
+ </ md-input-container >
58
+ < div >
59
+ < button md-button mdStepperNext type ="button "> Next</ button >
60
+ </ div >
61
+ </ md-step >
62
+
63
+ < md-step >
64
+ < ng-template mdStepLabel >
65
+ < div > Fill out your phone number</ div >
66
+ </ ng-template >
67
+ < md-input-container >
68
+ < input mdInput placeholder ="Phone number ">
69
+ < md-error > This field is required</ md-error >
70
+ </ md-input-container >
71
+ < div >
72
+ < button md-button mdStepperPrevious type ="button "> Back</ button >
73
+ < button md-button mdStepperNext type ="button "> Next</ button >
74
+ </ div >
75
+ </ md-step >
76
+
77
+ < md-step >
78
+ < ng-template mdStepLabel >
79
+ < div > Fill out your address</ div >
80
+ </ ng-template >
81
+ < md-input-container >
82
+ < input mdInput placeholder ="Address ">
83
+ < md-error > This field is required</ md-error >
84
+ </ md-input-container >
85
+ < div >
86
+ < button md-button mdStepperPrevious type ="button "> Back</ button >
87
+ < button md-button mdStepperNext type ="button "> Next</ button >
88
+ </ div >
89
+ </ md-step >
90
+
91
+ < md-step >
92
+ < ng-template mdStepLabel > Confirm your information</ ng-template >
93
+ Everything seems correct.
94
+ < div >
95
+ < button md-button > Done</ button >
96
+ </ div >
97
+ </ md-step >
98
+ </ md-vertical-stepper >
99
+
1
100
< h2 > Linear Vertical Stepper Demo</ h2 >
2
101
< md-vertical-stepper >
3
102
< md-step [valid] ="nameFormGroup.valid ">
@@ -46,21 +145,62 @@ <h2>Linear Vertical Stepper Demo</h2>
46
145
47
146
< h2 > Horizontal Stepper Demo</ h2 >
48
147
< md-horizontal-stepper >
49
- < md-step *ngFor ="let step of steps " [label] ="step.label ">
148
+ < md-step >
149
+ < ng-template mdStepLabel > Fill out your name</ ng-template >
50
150
< md-input-container >
51
- < input mdInput placeholder ="Answer " [(ngModel)] ="step.content ">
151
+ < input mdInput placeholder ="First Name ">
152
+ < md-error > This field is required</ md-error >
153
+ </ md-input-container >
154
+
155
+ < md-input-container >
156
+ < input mdInput placeholder ="Last Name ">
157
+ < md-error > This field is required</ md-error >
52
158
</ md-input-container >
53
159
< div >
54
- < button md-button mdStepperPrevious > Back</ button >
55
- < button md-button mdStepperNext > Next</ button >
160
+ < button md-button mdStepperNext type ="button "> Next</ button >
161
+ </ div >
162
+ </ md-step >
163
+
164
+ < md-step >
165
+ < ng-template mdStepLabel >
166
+ < div > Fill out your phone number</ div >
167
+ </ ng-template >
168
+ < md-input-container >
169
+ < input mdInput placeholder ="Phone number ">
170
+ < md-error > This field is required</ md-error >
171
+ </ md-input-container >
172
+ < div >
173
+ < button md-button mdStepperPrevious type ="button "> Back</ button >
174
+ < button md-button mdStepperNext type ="button "> Next</ button >
175
+ </ div >
176
+ </ md-step >
177
+
178
+ < md-step >
179
+ < ng-template mdStepLabel >
180
+ < div > Fill out your address</ div >
181
+ </ ng-template >
182
+ < md-input-container >
183
+ < input mdInput placeholder ="Address ">
184
+ < md-error > This field is required</ md-error >
185
+ </ md-input-container >
186
+ < div >
187
+ < button md-button mdStepperPrevious type ="button "> Back</ button >
188
+ < button md-button mdStepperNext type ="button "> Next</ button >
189
+ </ div >
190
+ </ md-step >
191
+
192
+ < md-step >
193
+ < ng-template mdStepLabel > Confirm your information</ ng-template >
194
+ Everything seems correct.
195
+ < div >
196
+ < button md-button > Done</ button >
56
197
</ div >
57
198
</ md-step >
58
199
</ md-horizontal-stepper >
59
200
60
- < h2 > Horizontal Stepper Demo with Templated Label </ h2 >
201
+ < h2 > Horizontal Stepper Demo</ h2 >
61
202
< md-horizontal-stepper >
62
- < md-step *ngFor ="let step of steps ">
63
- < ng-template mdStepLabel > {{step.label}}</ ng-template >
203
+ < md-step *ngFor ="let step of steps " [label] ="step.label ">
64
204
< md-input-container >
65
205
< input mdInput placeholder ="Answer " [(ngModel)] ="step.content ">
66
206
</ md-input-container >
@@ -71,9 +211,10 @@ <h2>Horizontal Stepper Demo with Templated Label</h2>
71
211
</ md-step >
72
212
</ md-horizontal-stepper >
73
213
74
- < h2 > Vertical Stepper Demo</ h2 >
75
- < md-vertical-stepper >
76
- < md-step *ngFor ="let step of steps " [label] ="step.label ">
214
+ < h2 > Horizontal Stepper Demo with Templated Label</ h2 >
215
+ < md-horizontal-stepper >
216
+ < md-step *ngFor ="let step of steps ">
217
+ < ng-template mdStepLabel > {{step.label}}</ ng-template >
77
218
< md-input-container >
78
219
< input mdInput placeholder ="Answer " [(ngModel)] ="step.content ">
79
220
</ md-input-container >
@@ -82,4 +223,4 @@ <h2>Vertical Stepper Demo</h2>
82
223
< button md-button mdStepperNext > Next</ button >
83
224
</ div >
84
225
</ md-step >
85
- </ md-vertical -stepper >
226
+ </ md-horizontal -stepper >
0 commit comments