How to do it...

  1. Open Terminal (or Command Prompt) and create a new app named ReactiveForm based on blank template and go into the folder as follows:
$ ionic start ReactiveForm blank$ cd ReactiveForm
  1. Open home.html and replace the file with following content:
<ion-header><ion-navbar color="primary"><ion-title>Reactive Form</ion-title></ion-navbar></ion-header><ion-content padding><p class="center"><ion-icon class="large lighter" primary name="contact"></ion-icon></p> <form [formGroup]="registerForm" (ngSubmit)="onSubmit()" novalidate><ion-list><ion-item><ion-label floating>Username</ion-label><ion-input type="text" formControlName="username"></ion-input></ion-item><ion-item><ion-label floating>Email</ion-label><ion-input type="email" formControlName="email"></ion-input> ...

Get Ionic Cookbook - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.