Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="container">
- <br />
- <form (ngSubmit)='loginUser()'
- [formGroup]='loginForm' novalidate class="form">
- <label>Username:
- <input formControlName='username' type="text"
- placeholder="Enter Email" />
- <div class="alert alert-danger"
- *ngIf="loginForm.get('username').hasError('required')
- && loginForm.get('username').touched">
- username is required and min length is 4.
- </div>
- </label><br>
- <label>Password:
- <input formControlName='password' type="password"
- placeholder="Enter Password" />
- <div class="alert alert-danger"
- *ngIf=" !loginForm.get('password').valid &&
- loginForm.get('password').touched">
- Password is required and should less than 8 characters
- </div>
- </label><br>
- <button [disabled]='loginForm.invalid' class="btn btn-default">Login</button>
- </form>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement