import { Component, OnInit } from '@angular/core';
+import { CartService } from '../cart.service';
@Component({
selector: 'app-cart',
})
export class CartComponent implements OnInit {
- constructor() { }
+ items;
+
+ constructor(private cartService: CartService) { }
ngOnInit() {
+ this.items = this.cartService.getItems();
}
}