13 |
Shopping cart
14 |
15 | @for (item of cartService.cart(); track item.id) {
16 |
17 | }
18 |
19 |
20 | `,
21 | styles: ``,
22 | })
23 | export class CartComponent {
24 | cartService = inject(CartService);
25 | }
26 |
--------------------------------------------------------------------------------
/src/app/pages/cart/order-summary/order-summary.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, computed, inject } from '@angular/core';
2 | import { CartService } from '../../../services/cart.service';
3 | import { ButtonComponent } from '../../../components/button/button.component';
4 | import { PrimaryButtonComponent } from '../../../components/primary-button/primary-button.component';
5 |
6 | @Component({
7 | selector: 'app-order-summary',
8 | imports: [PrimaryButtonComponent],
9 | template: `
10 |