docs: suggesting a typo error in the document (#57627)

PR Close #57627
This commit is contained in:
Harieswaran D 2024-09-02 20:47:31 +05:30 committed by Pawel Kozlowski
parent ad9ba9a95f
commit 54a0ea785f

View file

@ -215,7 +215,7 @@ Use `@Self()` so that Angular will only look at the `ElementInjector` for the cu
A good use case for `@Self()` is to inject a service but only if it is available on the current host element.
To avoid errors in this situation, combine `@Self()` with `@Optional()`.
For example, in the following `SelfComponent`, notice the injected `LeafService` in the constructor.
For example, in the following `SelfNoDataComponent`, notice the injected `LeafService` in the constructor.
<docs-code header="src/app/self-no-data/self-no-data.component.ts" language="typescript"
highlight="[7]">