mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
docs: update dependency-injection-context.md (#56736)
HeroService is not part of this example, and is only introduced in the next example. Use type Service1 for this.service1, as its type PR Close #56736
This commit is contained in:
parent
0f4219cf0c
commit
ae9505b702
1 changed files with 1 additions and 1 deletions
|
|
@ -23,7 +23,7 @@ class MyComponent {
|
|||
private service2: Service2 = inject(Service2); // In context
|
||||
|
||||
constructor() {
|
||||
this.service1 = inject(HeroService) // In context
|
||||
this.service1 = inject(Service1) // In context
|
||||
}
|
||||
}
|
||||
</docs-code>
|
||||
|
|
|
|||
Loading…
Reference in a new issue