-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
📦 NEW: Standalone + transform boolean input prop (Angular v17 feature…
…s) (#750) * 📦 NEW: standalone + transform boolean input prop * 📦 NEW: provider function to easily import Zxvbn for PSM * 📦 NEW: examples using standalone components and modules * 📖 DOC: update docs * 🚀 RELEASE: v11.0.0 * 🐛 FIX: unit test cases
- Loading branch information
1 parent
acb07fb
commit a1e2564
Showing
35 changed files
with
483 additions
and
544 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
109 changes: 30 additions & 79 deletions
109
projects/password-strength-meter-showcase/src/app/app.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,88 +1,39 @@ | ||
<form | ||
class="form-signup needs-validation" | ||
[formGroup]="userForm" | ||
(ngSubmit)="onSubmit()" | ||
novalidate | ||
> | ||
<div class="text-center mb-4"> | ||
<h1 class="h3 mb-3 font-weight-normal">Password Strength Meter - Demo</h1> | ||
<p> | ||
To display the strength of the password with a visual feedback. | ||
PasswordStrengthMeter use | ||
<a href="https://github.com/dropbox/zxcvbn">zxcvbn</a> to estimate the | ||
strength of the password and also provide a visual feedback with | ||
suggestions and warning messages. | ||
</p> | ||
</div> | ||
|
||
<div class="form-label-group"> | ||
<section class="container"> | ||
<h2 class="title">Password Strength Meter for Angular v17</h2> | ||
<div class="input-field"> | ||
<input | ||
type="text" | ||
id="inputFullName" | ||
class="form-control" | ||
[ngClass]="{ | ||
'is-invalid': fullName?.invalid && (fullName?.dirty || fullName?.touched) | ||
}" | ||
placeholder="Full name" | ||
formControlName="fullName" | ||
autocomplete="name" | ||
[(ngModel)]="text" | ||
placeholder="Type here to see the progress" | ||
/> | ||
<label for="inputFullName">Full name</label> | ||
<div class="invalid-feedback">Please provide a Full name.</div> | ||
</div> | ||
|
||
<div class="form-label-group"> | ||
<input | ||
type="text" | ||
id="inputEmail" | ||
class="form-control" | ||
[ngClass]="{ | ||
'is-invalid': email?.invalid && (email?.dirty || email?.touched) | ||
}" | ||
placeholder="Email address" | ||
formControlName="email" | ||
autocomplete="email" | ||
<password-strength-meter | ||
[password]="text" | ||
enableFeedback | ||
(strengthChange)="onPasswordStrengthChange($event)" | ||
/> | ||
<label for="inputEmail">Email address</label> | ||
<div class="invalid-feedback">Please provide a email.</div> | ||
</div> | ||
|
||
<div class="form-label-group"> | ||
<input | ||
type="password" | ||
id="inputPassword" | ||
class="form-control" | ||
[ngClass]="{ | ||
'is-invalid': password?.invalid && (password?.dirty || password?.touched) | ||
}" | ||
placeholder="Password" | ||
aria-describedby="passwordHelpBlock" | ||
formControlName="password" | ||
autocomplete="current-password" | ||
/> | ||
<label for="inputPassword">Password</label> | ||
<password-strength-meter | ||
[password]="password?.value" | ||
[numberOfProgressBarItems]="5" | ||
[enableFeedback]="true" | ||
(strengthChange)="onPasswordStrengthChanged($event)" | ||
></password-strength-meter> | ||
<small id="passwordHelpBlock" class="form-text text-muted"> | ||
Your password must be 8-20 characters long, contain letters and numbers, | ||
and must not contain spaces, special characters, or emoji. | ||
</small> | ||
<div class="invalid-feedback">Please provide a valid Password.</div> | ||
<p>Score: {{ score }}</p> | ||
</div> | ||
|
||
<div class="checkbox mb-3"> | ||
<label for="remember-me"> <input id="remember-me" type="checkbox" value="remember-me" /> Remember me </label> | ||
<div class="sub-section"> | ||
<h2 class="title">Other examples</h2> | ||
<nav> | ||
<a | ||
class="button" | ||
routerLink="/custom-service" | ||
routerLinkActive="button--active" | ||
>Custom Service</a | ||
> | ||
<a | ||
class="button" | ||
routerLink="/with-module" | ||
routerLinkActive="button--active" | ||
>Using with a module</a | ||
> | ||
</nav> | ||
</div> | ||
|
||
<button | ||
id="btn-submit" | ||
class="btn btn-lg btn-primary btn-block" | ||
type="submit" | ||
> | ||
Sign up | ||
</button> | ||
</form> | ||
<div class="sub-pages"> | ||
<router-outlet></router-outlet> | ||
</div> | ||
</section> |
Oops, something went wrong.