Form Groups and Controls

In this lesson, we'll learn how to create a new form instance.

The form we’ll be building will require the user to input their credit card information. This will involve things like validation, masking, and error handling. These are things that can be taken care of with reactive forms.

Registering the module

The first step, regardless of what form you’re trying to build, is to register the ReactiveFormsModule. We won’t have access to any of the reactive forms features unless we register this module first. It will provide us with the necessary infrastructure and directives for developing reactive forms.

We’ll update the app.module.ts file, to import the ReactiveFormsModule.

Get hands-on with 1200+ tech skills courses.