hello guys

I want to know about dependency injection in angular 4 and spring , so I gonna start with what I know : in angular 4 we inject the dependency by setting the service ( or something else ) in the constructor's arguments of component, and despite we inject many times from many components the same service, the value of the variable in this service stay the same (I mean the value still intact) for example : if we have service S with variable VARS, and tow component C1 and C2, and we inject the dependencie to S by C1, then we change the value (hello for example ) of VARS from C1, here if we have access to S from C2,we gonna find the 'hello' value, so is the same value, my question is: how the dependency injection work in spring, I don't want a theoretical lesson, what I want is practical case study (is the value change like angular or not )

thank you in advance.

Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.