I've seen this thread: Using multiple instances of the same service. Is it possible to use same multiple instance of a service from parent to children?
For example, I have an ElementService
in ParentComponent
and have 2 instances of that service
{ provide: 'instance1', useClass: ElementService},
{ provide: 'instance2', useClass: ElementService},
How should I use instance1
in Child1Component
and instance2
in Child2Component
?