Skip to content

Instantly share code, notes, and snippets.

@mvberg
Created April 4, 2020 19:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mvberg/449d09f8b40fe180b8cf2024818a7427 to your computer and use it in GitHub Desktop.
Save mvberg/449d09f8b40fe180b8cf2024818a7427 to your computer and use it in GitHub Desktop.
ionic-angular 5.0.7 input example
<ion-header>
<ion-toolbar>
<ion-title>Login</ion-title>
</ion-toolbar>
</ion-header>
<ion-content class="ion-padding">
<form [formGroup]="loginForm">
<ion-item>
<ion-label position="stacked">Email Address <ion-text color="danger">*</ion-text>
</ion-label>
<ion-input type="email" formControlName="email" class="form-control" required></ion-input>
</ion-item>
<ion-item>
<ion-label position="stacked">Password <ion-text color="danger">*</ion-text>
</ion-label>
<ion-input type="password" formControlName="password" class="form-control" required></ion-input>
</ion-item>
</form>
<div class="ion-padding">
<ion-button expand="block" type="submit" class="ion-no-margin" (click)="handleLogin(loginForm.value)">Login
</ion-button>
<div style="margin-top: 30px;text-align: center">
<a [routerLink]="['/register']">Don't have an account? Create Account.</a><br /><br />
<a (click)="handleForgotPassword()">Forgot Password?</a>
</div>
</div>
</ion-content>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment