@@ -91,86 +91,86 @@ <h1>@angular-material-extensions/password-strength</h1>
91
91
</ mat-card-content >
92
92
</ mat-card >
93
93
</ div >
94
+
94
95
<!--NGX-MATERIAL-PASSWORD-STRENGTH WITH VALIDATION AND FORM CONTROLLER-->
96
+ < div fxLayout ="column " class ="mt-3 ">
97
+ < mat-toolbar >
98
+ @angular-material-extensions/password-strength
99
+ < span fxFlex > </ span >
100
+
101
+ < button mat-icon-button
102
+ color ="accent "
103
+ matTooltip ="view source "
104
+ (click) ="viewSource = !viewSource ">
105
+ < mat-icon > code</ mat-icon >
106
+ </ button >
107
+ </ mat-toolbar >
108
+ < mat-card >
109
+ < mat-card-subtitle >
110
+ client side password validation with angular built in form controller
111
+ </ mat-card-subtitle >
112
+ < mat-card-subtitle >
113
+ < mat-slide-toggle [(ngModel)] ="showDetails2 "> Show Password Details</ mat-slide-toggle >
114
+ </ mat-card-subtitle >
115
+
116
+ < mat-card-content *ngIf ="viewSource ">
117
+ < mat-tab-group >
118
+ <!--tab 1-->
119
+ < mat-tab >
120
+ < ng-template mat-tab-label > HTML</ ng-template >
121
+ < markdown src ="assets/md/home/e2/html.md "> </ markdown >
122
+ </ mat-tab >
123
+
124
+ < mat-tab >
125
+ < ng-template mat-tab-label > TS</ ng-template >
126
+ < markdown src ="assets/md/home/e2/ts.md "> </ markdown >
127
+ </ mat-tab >
128
+ </ mat-tab-group >
129
+ </ mat-card-content >
95
130
96
- <!-- <div fxLayout="column" class="mt-3">-->
97
- <!-- <mat-toolbar>-->
98
- <!-- @angular-material-extensions/password-strength-->
99
- <!-- <span fxFlex></span>-->
100
-
101
- <!-- <button mat-icon-button-->
102
- <!-- color="accent"-->
103
- <!-- matTooltip="view source"-->
104
- <!-- (click)="viewSource = !viewSource">-->
105
- <!-- <mat-icon>code</mat-icon>-->
106
- <!-- </button>-->
107
- <!-- </mat-toolbar>-->
108
- <!-- <mat-card>-->
109
- <!-- <mat-card-subtitle>-->
110
- <!-- client side password validation with angular form controller-->
111
- <!-- </mat-card-subtitle>-->
112
- <!-- <mat-card-subtitle>-->
113
- <!-- <mat-slide-toggle [(ngModel)]="showDetails2">Show Password Details</mat-slide-toggle>-->
114
- <!-- </mat-card-subtitle>-->
115
-
116
- <!-- <mat-card-content *ngIf="viewSource">-->
117
- <!-- <mat-tab-group>-->
118
- <!-- <!–tab 1–>-->
119
- <!-- <mat-tab>-->
120
- <!-- <ng-template mat-tab-label>HTML</ng-template>-->
121
- <!-- <pre><code highlight [highlight]="html2"></code></pre>-->
122
- <!-- </mat-tab>-->
123
-
124
- <!-- <mat-tab>-->
125
- <!-- <ng-template mat-tab-label>TS</ng-template>-->
126
- <!-- <pre><code highlight [highlight]="ts"></code></pre>-->
127
- <!-- </mat-tab>-->
128
- <!-- </mat-tab-group>-->
129
- <!-- </mat-card-content>-->
130
-
131
- <!-- <mat-card-content>-->
132
-
133
- <!-- <!–password input filed–>-->
134
- <!-- <mat-form-field appearance="outline" style="width: 100%">-->
135
- <!-- <mat-label>Password</mat-label>-->
136
- <!-- <mat-pass-toggle-visibility #toggle2 matSuffix></mat-pass-toggle-visibility>-->
137
- <!-- <input matInput #passwordWithValidation-->
138
- <!-- [type]="toggle2.type"-->
139
- <!-- required-->
140
- <!-- [formControl]="passwordComponentWithValidation2.passwordFormControl"-->
141
- <!-- placeholder="Password">-->
142
-
143
- <!-- <!–password hint–>-->
144
- <!-- <mat-hint align="end" aria-live="polite">-->
145
- <!-- {{passwordWithValidation.value.length}} / 25-->
146
- <!-- </mat-hint>-->
147
-
148
- <!-- <!–password error msgs–>-->
149
- <!-- <mat-error *ngIf="passwordComponentWithValidation2.passwordFormControl.hasError('required')">-->
150
- <!-- Password is required-->
151
- <!-- </mat-error>-->
152
- <!-- <mat-error *ngIf="passwordComponentWithValidation2.passwordFormControl.hasError('pattern')">-->
153
- <!-- Password is not valid-->
154
- <!-- </mat-error>-->
155
-
156
- <!-- </mat-form-field>-->
157
-
158
- <!-- <!–@angular-material-extensions/password-strength's main component–>-->
159
- <!-- <mat-password-strength #passwordComponentWithValidation2-->
160
- <!-- (onStrengthChanged)="onStrengthChanged($event)"-->
161
- <!-- [password]="passwordWithValidation.value">-->
162
- <!-- </mat-password-strength>-->
163
-
164
- <!-- <!–Password's strength info–>-->
165
- <!-- <mat-password-strength-info-->
166
- <!-- *ngIf="showDetails2"-->
167
- <!-- [passwordComponent]="passwordComponentWithValidation2">-->
168
- <!-- </mat-password-strength-info>-->
169
-
170
- <!-- </mat-card-content>-->
171
-
172
- <!-- </mat-card>-->
173
- <!-- </div>-->
131
+ < mat-card-content >
132
+
133
+ <!--password input filed-->
134
+ < mat-form-field appearance ="outline " style ="width: 100% ">
135
+ < mat-label > Password</ mat-label >
136
+ < mat-pass-toggle-visibility #toggle2 matSuffix > </ mat-pass-toggle-visibility >
137
+ < input matInput #passwordWithValidation
138
+ [type] ="toggle2.type "
139
+ required
140
+ [formControl] ="passwordComponentWithValidation.passwordFormControl "
141
+ placeholder ="Password ">
142
+
143
+ <!--password hint-->
144
+ < mat-hint align ="end " aria-live ="polite ">
145
+ {{passwordWithValidation.value.length}} / {{passwordComponentWithValidation.max}}
146
+ </ mat-hint >
147
+
148
+ <!--password error msgs-->
149
+ < mat-error *ngIf ="passwordComponentWithValidation.passwordFormControl.hasError('required') ">
150
+ Password is required
151
+ </ mat-error >
152
+ < mat-error *ngIf ="passwordComponentWithValidation.passwordFormControl.hasError('pattern') ">
153
+ Password is not valid
154
+ </ mat-error >
155
+
156
+ </ mat-form-field >
157
+
158
+ <!--@angular-material-extensions/password-strength's main component-->
159
+ < mat-password-strength #passwordComponentWithValidation
160
+ (onStrengthChanged) ="onStrengthChanged($event) "
161
+ [password] ="passwordWithValidation.value ">
162
+ </ mat-password-strength >
163
+
164
+ <!--Password's strength info-->
165
+ < mat-password-strength-info
166
+ *ngIf ="showDetails2 "
167
+ [passwordComponent] ="passwordComponentWithValidation ">
168
+ </ mat-password-strength-info >
169
+
170
+ </ mat-card-content >
171
+
172
+ </ mat-card >
173
+ </ div >
174
174
175
175
<!-- CONFIRM PASSWORD-->
176
176
< div fxLayout ="column " class ="mt-3 ">
@@ -186,9 +186,6 @@ <h1>@angular-material-extensions/password-strength</h1>
186
186
</ button >
187
187
</ mat-toolbar >
188
188
189
- <!-- <form [formGroup]="passwordComponentWithValidation.formGroup">-->
190
- <!-- <form [formGroup]="formGroup">-->
191
- <!-- <form>-->
192
189
< mat-card >
193
190
< mat-card-subtitle >
194
191
confirm your password with angular form group
@@ -223,38 +220,38 @@ <h1>@angular-material-extensions/password-strength</h1>
223
220
< mat-pass-toggle-visibility #toggle3 matSuffix > </ mat-pass-toggle-visibility >
224
221
< input matInput #passwordWithConfirmation
225
222
[type] ="toggle3.type "
226
- [formControl] ="passwordComponentWithValidation .passwordFormControl "
223
+ [formControl] ="passwordComponentWithConfirmation .passwordFormControl "
227
224
placeholder ="Password "
228
225
required >
229
226
230
227
<!--password hint-->
231
228
< mat-hint align ="end " aria-live ="polite ">
232
- {{passwordWithConfirmation.value.length}} / {{passwordComponentWithValidation .max}}
229
+ {{passwordWithConfirmation.value.length}} / {{passwordComponentWithConfirmation .max}}
233
230
</ mat-hint >
234
231
235
232
<!--password error msgs-->
236
- <!-- <mat-error *ngIf="passwordComponentWithValidation .passwordFormControl.invalid">-->
233
+ <!-- <mat-error *ngIf="passwordComponentWithConfirmation .passwordFormControl.invalid">-->
237
234
<!-- Password is invalid-->
238
235
<!-- </mat-error>-->
239
- < mat-error *ngIf ="passwordComponentWithValidation .passwordFormControl.hasError('required') ">
236
+ < mat-error *ngIf ="passwordComponentWithConfirmation .passwordFormControl.hasError('required') ">
240
237
Password is required
241
238
</ mat-error >
242
- < mat-error *ngIf ="passwordComponentWithValidation .passwordFormControl.hasError('pattern') ">
239
+ < mat-error *ngIf ="passwordComponentWithConfirmation .passwordFormControl.hasError('pattern') ">
243
240
Password is not valid
244
241
</ mat-error >
245
242
246
243
</ mat-form-field >
247
244
248
245
<!--@angular-material-extensions/password-strength's main component-->
249
- < mat-password-strength #passwordComponentWithValidation
246
+ < mat-password-strength #passwordComponentWithConfirmation
250
247
(onStrengthChanged) ="onStrengthChanged($event) "
251
248
[password] ="passwordWithConfirmation.value ">
252
249
</ mat-password-strength >
253
250
254
251
<!--Password's strength info-->
255
252
< mat-password-strength-info
256
253
*ngIf ="showDetails3 "
257
- [passwordComponent] ="passwordComponentWithValidation ">
254
+ [passwordComponent] ="passwordComponentWithConfirmation ">
258
255
</ mat-password-strength-info >
259
256
260
257
<!--password input filed-->
@@ -263,20 +260,20 @@ <h1>@angular-material-extensions/password-strength</h1>
263
260
< mat-pass-toggle-visibility #toggleConfirmPassword matSuffix > </ mat-pass-toggle-visibility >
264
261
< input matInput #passwordToConfirm
265
262
[type] ="toggleConfirmPassword.type "
266
- [formControl] ="passwordComponentWithValidation .passwordConfirmationFormControl "
263
+ [formControl] ="passwordComponentWithConfirmation .passwordConfirmationFormControl "
267
264
placeholder ="Password ">
268
265
269
266
<!-- password hint-->
270
267
< mat-hint align ="end " aria-live ="polite ">
271
- {{passwordToConfirm.value.length}} / {{passwordComponentWithValidation .max}}
268
+ {{passwordToConfirm.value.length}} / {{passwordComponentWithConfirmation .max}}
272
269
</ mat-hint >
273
270
274
271
<!-- password error msgs-->
275
- < mat-error *ngIf ="passwordComponentWithValidation2 .passwordConfirmationFormControl.hasError('required') ">
272
+ < mat-error *ngIf ="passwordComponentWithConfirmation .passwordConfirmationFormControl.hasError('required') ">
276
273
Password confirmation is required
277
274
</ mat-error >
278
275
< mat-error
279
- *ngIf ="passwordComponentWithValidation2 .passwordConfirmationFormControl.hasError('notConfirmed') ">
276
+ *ngIf ="passwordComponentWithConfirmation .passwordConfirmationFormControl.hasError('notConfirmed') ">
280
277
Password is not the same
281
278
</ mat-error >
282
279
@@ -285,7 +282,6 @@ <h1>@angular-material-extensions/password-strength</h1>
285
282
</ mat-card-content >
286
283
287
284
</ mat-card >
288
- <!-- </form>-->
289
285
</ div >
290
286
</ div >
291
287
0 commit comments