Open DavidHJR97 opened 4 years ago
Anyone having trouble getting the shopping cart from firebase. I noticed on my project that my "add to cart" button is not showing up because It cannot get the shopping cart from firebase. I think I am having the problem in the function below:
async getCart(): Promise<Observable<ShoppingCart>> { const cartId = await this.getOrCreateCartId(); console.log(cartId); return this.db.object('/shopping-carts/' + cartId).valueChanges() .pipe(map(({items}) => new ShoppingCart(items))); }
Can anyone help me with this problem? Thanks!
Anyone having trouble getting the shopping cart from firebase. I noticed on my project that my "add to cart" button is not showing up because It cannot get the shopping cart from firebase. I think I am having the problem in the function below:
Can anyone help me with this problem? Thanks!