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: -