Angular
Building a CRUD Application with Angular & ASP.Net Core - Services in Angular POST
  •  

Creating our Input UI

PRO

Creating our Input UI

In this section, we created the HTML to allow the user to type in information that will be saved to our database through the API using a POST request.

We used ngModel throughout our HTML to allow us to bind our HTML to our component. This is what allows us to easily access the data that a user has input. We made the newCamp variable in our component of type Camp to bind to all of our inputs.

Also don't forget. We are using a form for our UI here and that means we need to import the FormsModule into our app.module.ts file.