From 02baaa4813e50656a74c289bff74ea5672fc9875 Mon Sep 17 00:00:00 2001 From: Sonu Kapoor Date: Sat, 4 Jan 2020 17:11:48 -0500 Subject: [PATCH] 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 --- aio/content/tutorial/toh-pt4.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aio/content/tutorial/toh-pt4.md b/aio/content/tutorial/toh-pt4.md index 68445df568..1a7119ce73 100644 --- a/aio/content/tutorial/toh-pt4.md +++ b/aio/content/tutorial/toh-pt4.md @@ -11,8 +11,8 @@ 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`, -you'll rely on Angular [*dependency injection*](guide/dependency-injection) +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. Services are a great way to share information among classes that _don't know each other_.