ngrx store subscription not called when state changes
问题 I am creating an application with dummy data defined in my service. In one component, I have the following function that deletes a product: removeItem(productId: string) { this.cartService.removeItem(productId); } and the service as follows: removeItem(productId: string) { const itemIndex = this.cart.products.findIndex(el => el.id === productId); if (itemIndex > -1) { this.cart.products.splice(itemIndex, 1); return Observable.of(this.cart) .subscribe((cartResponse: Cart) => { this.store