diff --git a/aio/content/examples/dependency-injection/src/app/providers.component.ts b/aio/content/examples/dependency-injection/src/app/providers.component.ts index 6679fe5ec6..1467ec07b6 100644 --- a/aio/content/examples/dependency-injection/src/app/providers.component.ts +++ b/aio/content/examples/dependency-injection/src/app/providers.component.ts @@ -158,11 +158,11 @@ export class Provider6bComponent { // #docregion silent-logger // An object in the shape of the logger service -export function SilentLoggerFn() {} +function silentLoggerFn() {} -const silentLogger = { +export const SilentLogger = { logs: ['Silent logger says "Shhhhh!". Provided via "useValue"'], - log: SilentLoggerFn + log: silentLoggerFn }; // #enddocregion silent-logger @@ -171,7 +171,7 @@ const silentLogger = { template: template, providers: // #docregion providers-7 - [{ provide: Logger, useValue: silentLogger }] + [{ provide: Logger, useValue: SilentLogger }] // #enddocregion providers-7 }) export class Provider7Component {