@@ -19,13 +19,13 @@ <h3>Linear Vertical Stepper Demo using a single form</h3>
19
19
</ div >
20
20
</ md-step >
21
21
22
- < md-step formGroupName ="1 " [stepControl] ="formArray.get([1]) ">
22
+ < md-step formGroupName ="1 " [stepControl] ="formArray.get([1]) " optional >
23
23
< ng-template mdStepLabel >
24
- < div > Fill out your phone number </ div >
24
+ < div > Fill out your email address </ div >
25
25
</ ng-template >
26
26
< md-input-container >
27
- < input mdInput placeholder ="Phone number " formControlName ="phoneFormCtrl ">
28
- < md-error > This field is required </ md-error >
27
+ < input mdInput placeholder ="Email address " formControlName ="emailFormCtrl ">
28
+ < md-error > The input is invalid. </ md-error >
29
29
</ md-input-container >
30
30
< div >
31
31
< button md-button mdStepperPrevious type ="button "> Back</ button >
@@ -62,12 +62,12 @@ <h3>Linear Horizontal Stepper Demo using a different form for each step</h3>
62
62
</ form >
63
63
</ md-step >
64
64
65
- < md-step [stepControl] ="phoneFormGroup " >
66
- < form [formGroup] ="phoneFormGroup ">
65
+ < md-step [stepControl] ="emailFormGroup " optional >
66
+ < form [formGroup] ="emailFormGroup ">
67
67
< ng-template mdStepLabel > Fill out your phone number</ ng-template >
68
68
< md-form-field >
69
- < input mdInput placeholder ="Phone number " formControlName ="phoneCtrl " required >
70
- < md-error > This field is required </ md-error >
69
+ < input mdInput placeholder ="Email address " formControlName ="emailCtrl " >
70
+ < md-error > The input is invalid </ md-error >
71
71
</ md-form-field >
72
72
< div >
73
73
< button md-button mdStepperPrevious > Back</ button >
@@ -88,44 +88,41 @@ <h3>Linear Horizontal Stepper Demo using a different form for each step</h3>
88
88
</ md-horizontal-stepper >
89
89
90
90
< h3 > Vertical Stepper Demo</ h3 >
91
+ < md-checkbox [(ngModel)] ="isNonEditable "> Make steps non-editable</ md-checkbox >
91
92
< md-vertical-stepper >
92
- < md-step >
93
+ < md-step [editable] =" !isNonEditable " >
93
94
< ng-template mdStepLabel > Fill out your name</ ng-template >
94
95
< md-form-field >
95
96
< input mdInput placeholder ="First Name ">
96
- < md-error > This field is required</ md-error >
97
97
</ md-form-field >
98
98
99
99
< md-form-field >
100
100
< input mdInput placeholder ="Last Name ">
101
- < md-error > This field is required</ md-error >
102
101
</ md-form-field >
103
102
< div >
104
103
< button md-button mdStepperNext type ="button "> Next</ button >
105
104
</ div >
106
105
</ md-step >
107
106
108
- < md-step >
107
+ < md-step [editable] =" !isNonEditable " >
109
108
< ng-template mdStepLabel >
110
109
< div > Fill out your phone number</ div >
111
110
</ ng-template >
112
111
< md-form-field >
113
112
< input mdInput placeholder ="Phone number ">
114
- < md-error > This field is required</ md-error >
115
113
</ md-form-field >
116
114
< div >
117
115
< button md-button mdStepperPrevious type ="button "> Back</ button >
118
116
< button md-button mdStepperNext type ="button "> Next</ button >
119
117
</ div >
120
118
</ md-step >
121
119
122
- < md-step >
120
+ < md-step [editable] =" !isNonEditable " >
123
121
< ng-template mdStepLabel >
124
122
< div > Fill out your address</ div >
125
123
</ ng-template >
126
124
< md-form-field >
127
125
< input mdInput placeholder ="Address ">
128
- < md-error > This field is required</ md-error >
129
126
</ md-form-field >
130
127
< div >
131
128
< button md-button mdStepperPrevious type ="button "> Back</ button >
@@ -148,25 +145,20 @@ <h3>Horizontal Stepper Demo</h3>
148
145
< ng-template mdStepLabel > Fill out your name</ ng-template >
149
146
< md-form-field >
150
147
< input mdInput placeholder ="First Name ">
151
- < md-error > This field is required</ md-error >
152
148
</ md-form-field >
153
149
154
150
< md-form-field >
155
151
< input mdInput placeholder ="Last Name ">
156
- < md-error > This field is required</ md-error >
157
152
</ md-form-field >
158
153
< div >
159
154
< button md-button mdStepperNext type ="button "> Next</ button >
160
155
</ div >
161
156
</ md-step >
162
157
163
158
< md-step >
164
- < ng-template mdStepLabel >
165
- < div > Fill out your phone number</ div >
166
- </ ng-template >
159
+ < ng-template mdStepLabel > Fill out your phone number</ ng-template >
167
160
< md-form-field >
168
161
< input mdInput placeholder ="Phone number ">
169
- < md-error > This field is required</ md-error >
170
162
</ md-form-field >
171
163
< div >
172
164
< button md-button mdStepperPrevious type ="button "> Back</ button >
@@ -175,12 +167,9 @@ <h3>Horizontal Stepper Demo</h3>
175
167
</ md-step >
176
168
177
169
< md-step >
178
- < ng-template mdStepLabel >
179
- < div > Fill out your address</ div >
180
- </ ng-template >
170
+ < ng-template mdStepLabel > Fill out your address</ ng-template >
181
171
< md-form-field >
182
172
< input mdInput placeholder ="Address ">
183
- < md-error > This field is required</ md-error >
184
173
</ md-form-field >
185
174
< div >
186
175
< button md-button mdStepperPrevious type ="button "> Back</ button >
0 commit comments