The cart view lists all items held in the user's shopping cart. It displays product details for each item and, from this page, a user can:
- Remove all goodies from his or her cart by clicking Clear Cart
- Update the quantity for any listed item
- Return to the products list by clicking on Continue shopping
- Proceed to checkout by clicking Checkout
The wireframe of the cart view
The significant part of the cart view is formed with dynamic content laid out in the grid. Look at the first column of the wireframe. There are rows of similar data we can use to display, modify, and validate. For this purpose, we can use Angular static forms to present the content of the shopping cart on the view.
Let's create cart-view.component.html
. In the first column, we need to print out information about products added to the shopping cart:
<div *ngIf="cart.count"> <form #form="ngForm"> <div class="table-responsive"> <table class="table table-sm...