Angular Component Interaction | Shared Service | CodeWithSrini

Опубликовано: 30 May 2026
на канале: CodeWithSrini
9,506
99

Another way to share data between components is via a common shared service.

Usually in the real world, we will be passing data with multiple components hierarchy, that has no direct connection with parent or child components.

And keeping Angular’s reactive nature in mind, there is always RxJS to overcome this scenario.

RxJS offers two types of Observable one is Subject and the other one is BehaviourSubject.