angular/packages/core
Alex Rickabaugh e3cef4a784 docs(core): deprecate providedIn: NgModule and providedIn: 'any' (#47616)
This commit deprecates the above two forms of `providedIn`.

DEPRECATED:

- The ability to pass an `NgModule` to the `providedIn` option for
`@Injectable` and `InjectionToken` is now deprecated.

`providedIn: NgModule` was intended to be a tree-shakable alternative to
NgModule providers. It does not have wide usage, and in most cases is used
incorrectly, in circumstances where `providedIn: 'root'` should be
preferred. If providers should truly be scoped to a specific NgModule, use
`NgModule.providers` instead.

- The ability to set `providedIn: 'any'` for an `@Injectable` or
`InjectionToken` is now deprecated.

`providedIn: 'any'` is an option with confusing semantics and is almost
never used apart from a handful of esoteric cases internal to the framework.

PR Close #47616
2022-10-04 11:52:38 -07:00
..
global build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
schematics build: update Angular tooling packages to 15.0.0-next.3 (#47584) 2022-09-30 10:53:04 -07:00
src docs(core): deprecate providedIn: NgModule and providedIn: 'any' (#47616) 2022-10-04 11:52:38 -07:00
test refactor(core): support host directives on a root component (#47620) 2022-10-04 11:51:29 -07:00
testing feat(core): support object-based DI flags in TestBed.inject() (#46761) 2022-09-27 10:09:53 -07:00
BUILD.bazel build(bazel): remove tsec patch to enable runfiles on Windows (#46447) 2022-06-21 12:19:53 -07:00
index.ts refactor(core): made comment structure consistent in index.ts (#43684) 2021-10-21 18:39:58 +00:00
package.json feat(core): drop support for Node.js 12 (#45286) 2022-03-08 12:05:03 -08:00
PACKAGE.md docs: add package doc files (#26047) 2018-10-05 15:42:14 -07:00
public_api.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00