- 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
- 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> ...