I am trying to make two Components
to get notified through a Service
when another Component
reacts to a DOM event.
This should be achieved using RxJS Subject Observable, or its direct subclasses(BehaviorSubject or ReplaySubject probably).
This is the model:
- TriggerComponent
- NotificationService
- FirstListeningComponent
- SecondListeningComponent
Neither of these three components are parent-child.
I tried to follow these approaches:
but I didn't manage to adapt them for my needs.
Please check my live example on plnkr.co
Am I on the right path?
Thank you