Submodule 23.1: Prepration

Adding the Contact component

Exercise

  1. Create a new component named contact
  2. Update the routes.ts file by importing the new component and adding the path contactus for the new component
  3. Update the Links in the footer.component.html file

Solution:

In this page, we will create a form. When a user clicks the Submit button, the data of this form will be stored in the db.json file in the feedback array as objects  (have a look at the end of your db.json file).

So, we have to create an Angular Service to send and fetch data between our application and our server.