As you already know, we are developing an SPA. Therefore, once the application loads, you will be able to perform all of the operations without a page refresh. All interactions with the server are performed using Ajax calls. Now, we'll make use of the Angular concepts that we covered in the first section. We'll cover the following scenarios:
- A page that will display a list of restaurants. This will also be our home page.
- Searching for restaurants.
- Restaurant details with reservation options.
- Logging in (not from the server, but used for displaying the flow).
- Reservation confirmation.
We'll add a restaurant list component, a restaurant detail component, and a login component using the following command:
// You may want to execute these one by one if OS does not permit.
ng generate component restaurants restaurant login
This will create three...