Form validation

here is my home.html file :smile:

      <ion-title text-center="true" class="title">Ionic 2 how to validae Form</ion-title>

<ion-content class="home">
     <form (submit)="doLogin">
  <div class="form">
    <div class="inside-form">
        <p class="alert"></p>
      <ion-label floating>Username</ion-label>
  <ion-input type="text" required size="50"></ion-input>
        <ion-label floating>Password</ion-label>
  <ion-input  type="password" required size="50"></ion-input>
  <button type="submit" (click)="click()">Log in</button>

And here is home.ts file :blush:

import {Component} from '@angular/core';
import { FormBuilder } from '@angular/common'

  templateUrl: 'build/pages/home/home.html'
export class HomePage {

I’m a new learning ionic 2 . Please have me validate this form i create i don’t now how to do is , if somebody now pleas coment . Thank so must !!.
love all you guys!.

there are two types of building forms in angular 2:

1 Like

thank you , your answer help me a lot of trolble , that blog is awsom , i have many exprerience when i read that, thank so must

1 Like

did you have e example buliding form in ionic 2 , if have please so me , thank