Creating your first Reactive Form with validation
You've learned about template-driven forms in the previous recipe and are now confident in building Angular apps with them. Now guess what? Reactive forms are even better. Many known engineers and businesses in the Angular community recommend using Reactive forms. The reason is their ease of use when it comes to building complex forms. In this recipe, you'll build your first Reactive form and will learn its basic usage.
Getting ready
The app that we are going to work with resides in start/apps/chapter08/ng-reactive-forms
inside the cloned repository:
- Open the code repository in your Code Editor.
- Open the terminal, navigate to the code repository directory and run
npm run serve ng-reactive-forms
to serve the project
This should open the app in a new browser tab. And you should see the following:
Now that we have the app running locally, let's...