How can we configure injectors with providers at different levels?

The users can configure injectors with providers at different levels of their application by setting a metadata value. The configuration can happen in one of three places,

  1. In the @Injectable() decorator for the service itself
  2. In the @NgModule() decorator for an NgModule
  3. In the @Component() decorator for a component