mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
@Injectable() supports a scope parameter which specifies the target module. However, it's still difficult to specify that a particular service belongs in the root injector. A developer attempting to ensure that must either also provide a module intended for placement in the root injector or target a module known to already be in the root injector (e.g. BrowserModule). Both of these strategies are cumbersome and brittle. Instead, this commit adds a token APP_ROOT_SCOPE which provides a straightforward way of targeting the root injector directly, without requiring special knowledge of modules within it. PR Close #22185 |
||
|---|---|---|
| .. | ||
| anchor_spec.ts | ||
| component_view_spec.ts | ||
| element_spec.ts | ||
| embedded_view_spec.ts | ||
| helper.ts | ||
| ng_content_spec.ts | ||
| ng_module_spec.ts | ||
| provider_spec.ts | ||
| pure_expression_spec.ts | ||
| query_spec.ts | ||
| services_spec.ts | ||
| text_spec.ts | ||
| view_def_spec.ts | ||