From 05a14f8a8b48815563a0649caf0488703e438e4a Mon Sep 17 00:00:00 2001 From: Brandon Date: Thu, 7 Feb 2019 14:58:04 +0000 Subject: [PATCH] docs: make parent finder functions compatible with AoT (#28592) PR Close #28592 --- .../src/app/parent-finder.component.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/aio/content/examples/dependency-injection-in-action/src/app/parent-finder.component.ts b/aio/content/examples/dependency-injection-in-action/src/app/parent-finder.component.ts index 4cf6ea7acc..76d2c1b2b0 100644 --- a/aio/content/examples/dependency-injection-in-action/src/app/parent-finder.component.ts +++ b/aio/content/examples/dependency-injection-in-action/src/app/parent-finder.component.ts @@ -19,20 +19,20 @@ const DifferentParent = Parent; // #enddocregion provide-the-parent // The `parentType` defaults to `Parent` when omitting the second parameter. // #docregion provide-the-parent -const provideParent = +export function provideParent // #enddocregion provide-parent, provide-the-parent // #docregion provide-parent - (component: any, parentType?: any) => { + (component: any, parentType?: any) { return { provide: parentType || Parent, useExisting: forwardRef(() => component) }; - }; + } // #enddocregion provide-parent // Simpler syntax version that always provides the component in the name of `Parent`. -const provideTheParent = +export function provideTheParent // #docregion provide-the-parent - (component: any) => { + (component: any) { return { provide: Parent, useExisting: forwardRef(() => component) }; - }; + } // #enddocregion provide-the-parent