How to do it...

  1. Create a new MyFormValidation app using the blank template, as shown, and go to the MyFormValidation folder:
$ ionic start MyFormValidation blank
$ cd MyFormValidation
  1. Open the ./src/app/app.module.ts file and replace the content with the following code:
import { BrowserModule } from '@angular/platform-browser';import { ErrorHandler, NgModule } from '@angular/core';import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular';import { SplashScreen } from '@ionic-native/splash-screen';import { StatusBar } from '@ionic-native/status-bar';import { MyApp } from './app.component';import { HomePage } from '../pages/home/home';import { ThankyouPage } from '../pages/thankyou/thankyou';import { MyFormService } from '../services/myform'; ...

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.