I need to use a component in two different modules, the component is using a service that has a certain state. the component also has child components that use the same service. I need two instances of the service because I don't want the actions in the component in module 1 to affect the state of the service in module two.
My current solution is that I inject the service in the component decorator and by that scope the service to the component instance. and I am passing this specific instance to the child components as @input
field.
Is there a better solution?