@Captressketh001
Posted
@devvsakib, I want to say well done on completing this task. But I have the following comments to make on the solutions
-
The solution is not responsive on all screen size. I noticed that you used bootstrap for the layout. Just learn how to use the bootstrap breakpoints to achieve responsiveness
-
I cannot delete the item in the cart too. You can use the following code to achieve it. create a cart array to hold the items in the cart. Loop through the product and check if the product id is equal to the one you want to remove and if yes, remove it from the cart array.
removeProduct(product){ this.products.forEach((i, index) => { if (i.id == product.id) { this.cart.splice(index, 1) } }) }
I hope this will help