import { Injectable } from '@angular/core';
+import { HttpClient } from '@angular/common/http';
@Injectable({
providedIn: 'root'
items= [];
- constructor() { }
+ constructor(private http: HttpClient) { }
addToCart(product) {
this.items.push(product);
this.items = [];
return this.items;
}
+
+ getShippingPrices() {
+ return this.http.get('/assets/shipping.json');
+ }
}