From 1de18ccda26c435dec0af8c78fd97d07bbd620d4 Mon Sep 17 00:00:00 2001 From: Masum ULU <49063256+masumulu28@users.noreply.github.com> Date: Tue, 19 Dec 2023 21:06:00 +0300 Subject: [PATCH] update `configureFn` name to `configureLayoutFn` --- docs/en/UI/Angular/Component-Replacement.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/en/UI/Angular/Component-Replacement.md b/docs/en/UI/Angular/Component-Replacement.md index eadb2579af..48a5d4fa74 100644 --- a/docs/en/UI/Angular/Component-Replacement.md +++ b/docs/en/UI/Angular/Component-Replacement.md @@ -120,10 +120,10 @@ Here's how you can do it: ```javascript export const CUSTOM_LAYOUT_PROVIDERS = [ - { provide: APP_INITIALIZER, useFactory: configureFn, deps: [ReplaceableComponentsService], multi: true }, + { provide: APP_INITIALIZER, useFactory: configureLayoutFn, deps: [ReplaceableComponentsService], multi: true }, ]; -function configureFn() { +function configureLayoutFn() { const service= inject( ReplaceableComponentsService) return () =>{ service.add({ @@ -133,7 +133,7 @@ function configureFn() { } } ``` -In this code, `configureFn` is a factory function that adds the new layout component to the `ReplaceableComponentsService`. The `APP_INITIALIZER` provider runs this function when the application starts. +In this code, `configureLayoutFn` is a factory function that adds the new layout component to the `ReplaceableComponentsService`. The `APP_INITIALIZER` provider runs this function when the application starts. note: (don't forget: you should add the CUSTOM_LAYOUT_PROVIDERS in the app.module.ts file)