From 99807c4ef78af186d2e472aed4483700ad9301be Mon Sep 17 00:00:00 2001 From: Bert Verhelst Date: Wed, 23 May 2018 10:27:27 +0200 Subject: [PATCH] docs: Improve docs for downgrading a service --- aio/content/guide/upgrade.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/aio/content/guide/upgrade.md b/aio/content/guide/upgrade.md index 025300cae4b644..4be7b0f987b71f 100644 --- a/aio/content/guide/upgrade.md +++ b/aio/content/guide/upgrade.md @@ -778,16 +778,25 @@ delete them once the upgrade is over. It's also recommended to export the `heroesServiceFactory` function so that Ahead-of-Time compilation can pick it up. +
+ +**Note:** The 'heroes' string inside the factory refers to the AngularJS `HeroesService`. +It is common in AngularJS apps to choose a service name for the token, for example "heroes", +and append the "Service" suffix to create the class name. + +
+ +You can then provide the service to Angular by adding it to the `@NgModule`: + -You can then inject it in Angular using its class as a type annotation: +Then use the service inside your component by injecting it in the component constructor using its class as a type annotation: -