docs: clarifies how the service is injected (#34638)

There was some confusion about how the service will be injected in the sentence with the `new` keyword. This PR should hopefully clear the confusion.

Fixes #34612

PR Close #34638
This commit is contained in:
Sonu Kapoor 2020-01-04 17:11:48 -05:00 committed by Alex Rickabaugh
parent 8942b7106d
commit 02baaa4813
1 changed files with 2 additions and 2 deletions

View File

@ -11,7 +11,7 @@ Components shouldn't fetch or save data directly and they certainly shouldn't kn
They should focus on presenting data and delegate data access to a service.
In this tutorial, you'll create a `HeroService` that all application classes can use to get heroes.
Instead of creating that service with `new`,
Instead of creating that service with the [`new` keyword](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/new),
you'll rely on Angular [*dependency injection*](guide/dependency-injection)
to inject it into the `HeroesComponent` constructor.