From 69b57b2dca620197f81f2abcc9f65743e596d2c5 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 (#19371) PR Close #19371 --- 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 025300cae4..4be7b0f987 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: -