Angular

Angular Subjects: See how to efficiently use them by implementing an intermediate service for data sharing between components

Angular Subjects: See how to efficiently use them by implementing an intermediate service for data sharing between components

Using a shared service to exchange data between 2 unrelated components is a quite used practice. Here, we will go coding in a step-by-step manner, to see how we can use the Subject’s flavors and avoid some commonly faced pitfalls.