Skip to content

Commit f9e4734

Browse files
committed
demo(app): integrated the ngx-material-password-strength-info's component
1 parent 1ac8e9f commit f9e4734

File tree

6 files changed

+6
-91
lines changed

6 files changed

+6
-91
lines changed

demo/e2e/app.e2e-spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { NgxMaterialPasswordStrengthDemoPage } from './app.po';
22

3-
describe('ngx-material-password-strength-demo App', () => {
3+
describe('ngx-material-ngx-material-password-strength-demo App', () => {
44
let page: NgxMaterialPasswordStrengthDemoPage;
55

66
beforeEach(() => {

demo/src/app/home/home.component.html

Lines changed: 5 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -53,95 +53,10 @@ <h1>ngx-material-password-strength</h1>
5353
[password]="password.value">
5454
</ngx-material-password-strength>
5555

56-
<mat-card *ngIf="showDetails" fxFlex fxLayout="row" fxLayoutAlign="center">
57-
<mat-card-content fxLayout="column" fxLayoutAlign="start">
58-
59-
<div fxLayout="row" fxLayoutGap="10px">
60-
<div *ngIf="passwordComponent.containAtLeastOneLowerCaseLetter; then done else error">
61-
</div>
62-
<ng-template #done>
63-
<mat-icon color="primary">done</mat-icon>
64-
</ng-template>
65-
<ng-template #error>
66-
<mat-icon color="warn">error</mat-icon>
67-
</ng-template>
68-
<div>
69-
<p>contains at least one lower character</p>
70-
</div>
71-
</div>
72-
73-
<div fxLayout="row" fxLayoutGap="10px">
74-
<div *ngIf="passwordComponent.containAtLeastOneUpperCaseLetter; then done else error">
75-
</div>
76-
<ng-template #done>
77-
<mat-icon color="primary">done</mat-icon>
78-
</ng-template>
79-
<ng-template #error>
80-
<mat-icon color="warn">error</mat-icon>
81-
</ng-template>
82-
<div>
83-
<p>contains at least one upper character</p>
84-
</div>
85-
</div>
86-
87-
<div fxLayout="row" fxLayoutGap="10px">
88-
<div *ngIf="passwordComponent.containAtLeastOneDigit; then done else error">
89-
</div>
90-
<ng-template #done>
91-
<mat-icon color="primary">done</mat-icon>
92-
</ng-template>
93-
<ng-template #error>
94-
<mat-icon color="warn">error</mat-icon>
95-
</ng-template>
96-
<div>
97-
<p>contains at least one digit character</p>
98-
</div>
99-
</div>
100-
101-
<div fxLayout="row" fxLayoutGap="10px">
102-
<div *ngIf="passwordComponent.containAtLeastOneSpecialChar; then done else error">
103-
</div>
104-
<ng-template #done>
105-
<mat-icon color="primary">done</mat-icon>
106-
</ng-template>
107-
<ng-template #error>
108-
<mat-icon color="warn">error</mat-icon>
109-
</ng-template>
110-
<div>
111-
<p>contains at least one special character</p>
112-
</div>
113-
</div>
114-
115-
<div fxLayout="row" fxLayoutGap="10px">
116-
<div *ngIf="passwordComponent.containAtLeastEightChars; then done else error">
117-
</div>
118-
<ng-template #done>
119-
<mat-icon color="primary">done</mat-icon>
120-
</ng-template>
121-
<ng-template #error>
122-
<mat-icon color="warn">error</mat-icon>
123-
</ng-template>
124-
<div>
125-
<p>contains at least eight characters</p>
126-
</div>
127-
</div>
128-
129-
<div fxLayout="row" fxLayoutGap="10px">
130-
<div *ngIf="passwordComponent.strength === 100; then done else error">
131-
</div>
132-
<ng-template #done>
133-
<mat-icon color="primary">done</mat-icon>
134-
</ng-template>
135-
<ng-template #error>
136-
<mat-icon color="warn">error</mat-icon>
137-
</ng-template>
138-
<div>
139-
<p>Password's strength = {{passwordComponent.strength}} %100</p>
140-
</div>
141-
</div>
142-
143-
</mat-card-content>
144-
</mat-card>
56+
<ngx-material-password-strength-info
57+
*ngIf="showDetails"
58+
[passwordComponent]="passwordComponent">
59+
</ngx-material-password-strength-info>
14560
</div>
14661
</mat-card-content>
14762
</mat-card>
@@ -158,7 +73,7 @@ <h1>ngx-material-password-strength</h1>
15873

15974
<div fxFlex>
16075

161-
<mat-form-field appearance="outline" style="width: 100%" >
76+
<mat-form-field appearance="outline" style="width: 100%">
16277
<mat-label>Password</mat-label>
16378
<input matInput #passwordWithValidation
16479
[type]="inputType"

src/module/component/password-strength/password-strength.component.html renamed to src/module/component/ngx-material-password-strength/password-strength.component.html

File renamed without changes.

src/module/component/ngx-material-password-strength/password-strength.component.scss

Whitespace-only changes.

src/module/component/password-strength/password-strength.component.spec.ts renamed to src/module/component/ngx-material-password-strength/password-strength.component.spec.ts

File renamed without changes.

src/module/component/password-strength/password-strength.component.ts renamed to src/module/component/ngx-material-password-strength/password-strength.component.ts

File renamed without changes.

0 commit comments

Comments
 (0)