AI Hints
Home›Angular Tutorial›Project: The Plan, Models and Service and The Book List
Angular · Lesson 112 of 120

Project: The Plan

Putting it all together.

⏱ 2 min read▶ Video at 2:14:19🎓 Free
Watch this lesson in the Angular courseWatch on YouTube ↗Full Angular course

Let's put the whole course together, in one project. Page Turners, a small bookshop, that uses our lesson server's real books API.

  • The whole course
  • One project
  • Page Turners

The pages

The book list shows every book, with a search box. Each book has its own page, with an add to basket button. The basket page lists what's been added, with the total. And checkout takes the customer's details.

AddressPageUses
/booksthe book listhttpResource, search
/books/:idone bookroute parameter
/basketthe basketa service, signals
/checkoutcheckoutsignal forms

A customer’s journey

A customer searches the list, and opens a book. They add it to the basket. The basket count, in the header, goes up. They open the basket, check the total, and go to checkout. Then they fill in their details, and place the order.

  1. Search, open a book
  2. Add to basket
  3. Header count goes up
  4. Basket: check the total
  5. Checkout: place the order

The files

Book is the data type. Basket is the shared service. App is the header, with the router outlet. And there's one component for each page, plus the tests.

FileJob
book.tsthe Book type
basket.tsbasket service
app.ts + app.routes.tsheader, routes
book-list, book-pagebrowsing
basket-page, checkoutbuying

Summary

Page Turners has four pages, one shared basket, and uses a real API. Next, the model, and the basket service.

Key takeaways
  • Four pages
  • One basket service
  • A real API
Next up: Project: Models and Service — the foundations