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

Unlock this course with a free trial

Join today to access over 24,400 courses taught by industry experts.

Creating a form

Creating a form

- [Instructor] In this part, we're going to work on the Add Transaction form, which when you click in here, you are redirected to this page. We have this form which has a type, and then based on the type that you select, which can either be an Expense or an Income, we have the category down here. So you select that Income, you have the Income categories, you select Expense, you have the Expense categories. Then you also provide the amount and the date. Other than that, we have a form validation, which as you can see, if you don't provide all the fields, then this button is disabled. So only now, select this one, this one, then this one, this button is going to be enabled. For that, let us go to our project and see it in action. In the Angular project, go to src, app, components, then go to transaction-form, then open the HTML file, so the HTML, and also the TypeScript file. Now we are going to start with the TypeScript one. We are going to define in here the form, and we're going to…

Contents