Angular - Updating component value, when service value changes
问题 I have multiple components (in an NgFor loop) that call the same service. What I would like is that when one component changes a value in that same service, that new value then gets sent to every component that calls that service and subsequently updates that value in a component variable. I hope that makes sense. If you need some more information, please let me know. 回答1: Instead of a BehaviorSubject (which are often overkill in simple scenarios), you can use simple getters: Service has some