I have a very strange situation.
I have a service class called Test1 which has an instance variable public account = new Subject(); Then this class is injected into 2 different components, but those component are parent-child. Now what happens is first's component's code changes something into that instance variable(Test1's account). It turns out as soon as this change happens, another component is subscribing to it and when changed happened, subscribe happened which leads me to the following question.
Question 1)WHen service class got injected into 2 components, let's say it got injected into compA first, and then I think in compB, it got injected from cache and both components have same class.
QUestion 2) does angular cache dependencies when injecting into constructor?
Question 3) whose job is to to cache dependencies ? is it Provider's object we use in modules?