As I delve into Angular, my goal is to create a straightforward ecommerce platform that allows users to add items to their cart, view them, and complete a checkout process.
To accomplish this, I have set up three components: the products list, cart, and checkout. Additionally, I have implemented a cart service to handle all cart-related operations, such as adding items, removing items, and calculating the total cost of the cart.
My main concern now is finding the most effective way to save the cart data when a user closes their browser and reopens it. Initially, the user's orders will be processed anonymously, without requiring any registration.
Should I stick with using local storage for now, and then transition to cookies once user registration is implemented? What would be the best strategy for ensuring a seamless experience for the user?