Start here. This is the direct spoken answer to practice first.
Overview
A provider declaration chooses both how a dependency is created and which part of the application shares it.
Angular resolves dependencies through hierarchical injectors. An application-level or root provider is shared broadly, a route provider can scope an instance to that route environment, and a component provider creates an instance for that component subtree. If the same token is provided closer to the requester, that nearer provider wins.