Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
44 lines (39 sloc) 1.49 KB
<ion-header>
<ion-toolbar>
<ion-title>Login</ion-title>
</ion-toolbar>
</ion-header>
<ion-content padding>
<form [formGroup]="loginForm">
<ion-item>
<ion-label stacked>Email</ion-label>
<ion-input formControlName="email" type="email" placeholder="Your email address"
[class.invalid]="!loginForm.controls['email'].valid &&
loginForm.controls['email'].touched">
</ion-input>
</ion-item>
<ion-item class="error-message" *ngIf="!loginForm.controls['email'].valid &&
loginForm.controls['email'].touched">
<ion-label>Please enter a valid email address.</ion-label>
</ion-item>
<ion-item>
<ion-label stacked>Password</ion-label>
<ion-input formControlName="password" type="password" placeholder="Your password"
[class.invalid]="!loginForm.controls['password'].valid&& loginForm.controls['password'].touched">
</ion-input>
</ion-item>
<ion-item class="error-message" *ngIf="!loginForm.controls['password'].valid
&& loginForm.controls['password'].touched">
<ion-label>Your password needs more than 6 characters.</ion-label>
</ion-item>
<ion-button (click)="loginUser(loginForm)" expand="block" [disabled]="!loginForm.valid">
Log In
</ion-button>
</form>
<ion-button expand="block" fill="clear" routerLink="/signup">
Create a new account
</ion-button>
<ion-button expand="block" fill="clear" routerLink="/reset-password">
I forgot my password :(
</ion-button>
</ion-content>