From the course: Building Angular and ASP.NET Web API Apps

Unlock the full course today

Join today to access over 22,700 courses taught by industry experts or purchase this course individually.

Configuring an Angular reactive form

Configuring an Angular reactive form

From the course: Building Angular and ASP.NET Web API Apps

Start my 1-month free trial

Configuring an Angular reactive form

- [Narrator] To create an entry in our application, we are going to create a form. And in Angular there aren't two ways of creating forms and handling data. You can either create a Reactive form which is more robust. They are great because they are scalable, reusable and most importantly testable. Also we have Template-driven forms. Which are really useful when you want to work with simple forms. Like for example our sign-you form. So let us create our first Reactive form. Since we are going to create a new feature in our application we need to generate a new component. And to generate a new component using the angular-cli, you need to write ng g c and then provide a name for this component. So let us write in here new-entry. Then press Enter. This command doesn't work because in our solution we currently have two modules. One is the router module and the other one the app module. So let us specify that for this component, we are going to use the app module. So let us add in here -m…

Contents