How do you configure injectors with providers at different levels?

Posted by Jennifer | Updated on

You can configure injectors with providers at different levels of your 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

If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers