mean-guide-frontend
Version:
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.1.1.
38 lines (37 loc) • 927 B
HTML
<mat-card>
<mat-spinner *ngIf="isLoading"></mat-spinner>
<form *ngIf="!isLoading" (submit)="onLogin(loginForm)" #loginForm="ngForm">
<mat-form-field>
<input
name="email"
matInput
ngModel
type="email"
#emailInput="ngModel"
placeholder="Email"
required
email
/>
<mat-error *ngIf="emailInput.invalid"
>Please enter a valid email.</mat-error
>
</mat-form-field>
<mat-form-field>
<input
ngModel
type="password"
name="password"
matInput
placeholder="Password"
#passwordInput="ngModel"
required
/>
<mat-error *ngIf="passwordInput.invalid"
>Please enter a valid password.</mat-error
>
</mat-form-field>
<button color="primary" mat-raised-button type="submit" *ngIf="!isLoading">
Login
</button>
</form>
</mat-card>