Creating reactive forms in Ionic

In the previous example, we have created a complex form with validations. If you notice carefully, we used angular validations inside our template file, particularly in home.html. These type of forms are called as template driven form, where most of the work is done on template side. This is something very similar to what we had in AngularJS.

There is another type of form in Angular, called the reactive form. The difference is, in reactive forms, we used validations and other configuration inside the class of the component, instead of in the template. The following is the definition from Angular Docs:

"With reactive forms, you create a tree of Angular form control objects in the component class and bind them ...

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.