diff --git a/adev/src/content/guide/di/defining-dependency-providers.md b/adev/src/content/guide/di/defining-dependency-providers.md index 09ba1886082..cd18cdb8a8b 100644 --- a/adev/src/content/guide/di/defining-dependency-providers.md +++ b/adev/src/content/guide/di/defining-dependency-providers.md @@ -705,7 +705,7 @@ export class ModalComponent { } - Must be provided wherever needed - Always included in the same JavaScript bundle as the component or directive, even if the value is never injected -Note: If multiple directives on the same element provide the same token, one will win, but which one is undefined. +NOTE: If multiple directives on the same element provide the same token, one will win, but which one is undefined. ### Route providers diff --git a/adev/src/content/guide/di/dependency-injection-context.md b/adev/src/content/guide/di/dependency-injection-context.md index e8c800aa8cf..0254fe7a70b 100644 --- a/adev/src/content/guide/di/dependency-injection-context.md +++ b/adev/src/content/guide/di/dependency-injection-context.md @@ -37,16 +37,16 @@ This requires access to a given injector, like the `EnvironmentInjector`, for ex @Injectable({ -providedIn: 'root', + providedIn: 'root', }) export class HeroService { -private environmentInjector = inject(EnvironmentInjector); + private environmentInjector = inject(EnvironmentInjector); -someMethod() { -runInInjectionContext(this.environmentInjector, () => { -inject(SomeService); // Do what you need with the injected service -}); -} + someMethod() { + runInInjectionContext(this.environmentInjector, () => { + inject(SomeService); // Do what you need with the injected service + }); + } }