Skip to content

Commit

Permalink
docs: clarify providedIn options (#42355)
Browse files Browse the repository at this point in the history
The list for the possible options of providedIn was not totally clear. This commit ensures each possible value is included explicitly in the docs.

fixes #29330

PR Close #42355
  • Loading branch information
atscott authored and umairhm committed May 28, 2021
1 parent 2662373 commit 0b2a371
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions packages/core/src/di/injectable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,15 @@ export interface InjectableDecorator {
*/
export interface Injectable {
/**
* Determines which injectors will provide the injectable,
* by either associating it with an `@NgModule` or other `InjectorType`,
* or by specifying that this injectable should be provided in one of the following injectors:
* Determines which injectors will provide the injectable.
*
* - `Type<any>` - associates the injectable with an `@NgModule` or other `InjectorType`,
* - 'null' : Equivalent to `undefined`. The injectable is not provided in any scope automatically
* and must be added to a `providers` array of an [@NgModule](api/core/NgModule#providers),
* [@Component](api/core/Directive#providers) or [@Directive](api/core/Directive#providers).
*
* The following options specify that this injectable should be provided in one of the following
* injectors:
* - 'root' : The application-level injector in most apps.
* - 'platform' : A special singleton platform injector shared by all
* applications on the page.
Expand Down

0 comments on commit 0b2a371

Please sign in to comment.