providersarray. There's a
LoginServiceregistered with the root injector.
@Component. This particular component has no
providersarray and will use the root injector for all of its dependencies.
ChatWindowcomponent. Each of these components has their own instantiation of a
Logout/Login, but it has no injector.
ChatInputcomponents for each
ChatWindow. There are also
Logout/Loginas their parent.
providersarray in its decorator. Components that have no
providersarray look to their parent component for an injector. If the parent does not have an injector, it looks up until it reaches the root injector.
providerarrays. If a child component is decorated with a
providersarray that contains dependencies that were also requested in the parent component(s), the dependencies the child receives will shadow the parent dependencies. This can have all sorts of unintended consequences.
Uniqueis bootstrapped into the root injector.
Uniqueservice generates a value unique to its instance upon instantiation.
Unique. This component will not share the same value as the root injector's