Modeling Product and Cart State with Signals
摘要
In the previous chapter, we created an Angular application and built our first signal-powered service to manage the product catalog. That was just the beginning. In this chapter, we introduce the shopping cart, define a model for cart items, and implement a dedicated service to manage it. We’ll also begin deriving useful reactive state using computed(), things like item count and total cost.