Form validation with Reactive forms
In the previous recipe, you learned how to create a Reactive form. Now, we're going to learn how to test them. In this recipe, you'll learn some basic principles of testing Reactive forms. We're going to use the same example from the previous recipe (the release logs app) and will implement a number of test cases.
The project that we are going to work with resides in
chapter08/start_here/validating-reactive-forms inside the cloned repository:
- Open the project in Visual Studio Code.
- Open the terminal and run
npm installto install the dependencies of the project.
- Once done, run
ng serve -o.
This should open the app in a new browser tab and you should see it as follows: