From 2de75f40cc5bf77e81eecc131bd2dd863d84ee9f Mon Sep 17 00:00:00 2001 From: sumeyye Date: Fri, 11 Jul 2025 14:49:52 +0300 Subject: [PATCH] update: module docs that has angular ui option --- docs/en/modules/account-pro.md | 42 +++++++++----------- docs/en/modules/audit-logging-pro.md | 38 ++++++++---------- docs/en/modules/chat.md | 35 +++++++---------- docs/en/modules/gdpr.md | 43 +++++++++++---------- docs/en/modules/identity-pro.md | 38 ++++++++---------- docs/en/modules/identity-server-pro.md | 36 +++++++---------- docs/en/modules/language-management.md | 40 +++++++++---------- docs/en/modules/payment.md | 34 ++++++++-------- docs/en/modules/saas.md | 38 ++++++++---------- docs/en/modules/text-template-management.md | 38 ++++++++---------- 10 files changed, 168 insertions(+), 214 deletions(-) diff --git a/docs/en/modules/account-pro.md b/docs/en/modules/account-pro.md index c53a6f24ec..594d51da62 100644 --- a/docs/en/modules/account-pro.md +++ b/docs/en/modules/account-pro.md @@ -301,47 +301,41 @@ See the `AccountPermissions` class members for all permissions defined for this #### Installation -In order to configure the application to use the `AccountPublicModule` and the `AccountAdminModule`, you first need to import `AccountPublicConfigModule` from `@volo/abp.ng.account/public/config` and `AccountAdminConfigModule` from `@volo/abp.ng.account/admin/config` to root module. Config modules has a static `forRoot` method which you should call for a proper configuration. +In order to configure the application to use the public account module and the admin account module, you first need to import `provideAccountPublicConfig` from `@volo/abp.ng.account/public/config` and `provideAccountAdminConfig` from `@volo/abp.ng.account/admin/config`. Then, you will need to append them to the `appConfig` array. ```js -// app.module.ts -import { AccountAdminConfigModule } from '@volo/abp.ng.account/admin/config'; -import { AccountPublicConfigModule } from '@volo/abp.ng.account/public/config'; - -@NgModule({ - imports: [ - // other imports - AccountPublicConfigModule.forRoot(), - AccountAdminConfigModule.forRoot(), - // other imports +// app.config.ts +import { provideAccountPublicConfig } from '@volo/abp.ng.account/public/config'; +import { provideAccountAdminConfig } from '@volo/abp.ng.account/admin/config'; + +export const appConfig: ApplicationConfig = { + providers: [ + // ... + provideAccountAdminConfig(), + provideAccountPublicConfig(), ], - // ... -}) -export class AppModule {} +}; ``` -The `AccountPublicModule` should be imported and lazy-loaded in your routing module. It has a static `forLazy` method for configuration. Available options are listed below. It is available for import from `@volo/abp.ng.account/public`. +The account public package should be imported and lazy-loaded in your routing array. It has a static `createRoutes` method for configuration. Available options are listed below. It is available for import from `@volo/abp.ng.account/public`. ```js -// app-routing.module.ts -const routes: Routes = [ - // other route definitions +// app.routes.ts +export const APP_ROUTES: Routes = [ + // ... { path: 'account', - loadChildren: () => - import('@volo/abp.ng.account/public').then(m => m.AccountPublicModule.forLazy(/* options here */)), + loadChildren: () => import('@volo/abp.ng.account/public').then(c => c.createRoutes(/* options here */)), }, ]; -@NgModule(/* AppRoutingModule metadata */) -export class AppRoutingModule {} ``` -> If you have generated your project via the startup template, you do not have to do anything, because it already has the modules. +> If you have generated your project via the startup template, you do not have to do anything, because it already has the necessary configurations.

Options

-You can modify the look and behavior of the module pages by passing the following options to `AccountModule.forLazy` static method: +You can modify the look and behavior of the module pages by passing the following options to `createRoutes` static method: - **redirectUrl**: Default redirect URL after logging in. - **entityActionContributors:** Changes grid actions. Please check [Entity Action Extensions for Angular](../framework/ui/angular/entity-action-extensions.md) for details. diff --git a/docs/en/modules/audit-logging-pro.md b/docs/en/modules/audit-logging-pro.md index cb32ff52fe..01bb49ec27 100644 --- a/docs/en/modules/audit-logging-pro.md +++ b/docs/en/modules/audit-logging-pro.md @@ -234,45 +234,39 @@ See the `AbpAuditLoggingPermissions` class members for all permissions defined f #### Installation -In order to configure the application to use the `AuditLoggingModule`, you first need to import `AuditLoggingConfigModule` from `@volo/abp.ng.audit-logging/config` to root module. `AuditLoggingConfigModule` has a static `forRoot` method which you should call for a proper configuration. +In order to configure the application to use the audit logging module, you first need to import `provideAuditLoggingConfig` from `@volo/abp.ng.audit-logging/config` to root configuration. Then, you will need to append it to the `appConfig` array. ```js -// app.module.ts -import { AuditLoggingConfigModule } from '@volo/abp.ng.audit-logging/config'; - -@NgModule({ - imports: [ - // other imports - AuditLoggingConfigModule.forRoot(), - // other imports +// app.config.ts +import { provideAuditLoggingConfig } from '@volo/abp.ng.audit-logging/config'; + +export const appConfig: ApplicationConfig = { + providers: [ + // ... + provideAuditLoggingConfig(), ], - // ... -}) -export class AppModule {} +}; ``` -The `AuditLoggingModule` should be imported and lazy-loaded in your routing module. It has a static `forLazy` method for configuration. Available options are listed below. It is available for import from `@volo/abp.ng.audit-logging`. +The audit logging module should be imported and lazy-loaded in your routing array. It has a static `createRoutes` method for configuration. Available options are listed below. It is available for import from `@volo/abp.ng.audit-logging`. ```js -// app-routing.module.ts -const routes: Routes = [ - // other route definitions +// app.routes.ts +export const APP_ROUTES: Routes = [ + // ... { path: 'audit-logs', - loadChildren: () => - import('@volo/abp.ng.audit-logging').then(m => m.AuditLoggingModule.forLazy(/* options here */)), + loadChildren: () => import('@volo/abp.ng.audit-logging').then(c => c.createRoutes(/* options here */)), }, ]; -@NgModule(/* AppRoutingModule metadata */) -export class AppRoutingModule {} ``` -> If you have generated your project via the startup template, you do not have to do anything, because it already has both `AuditLoggingConfigModule` and `AuditLoggingModule`. +> If you have generated your project via the startup template, you do not have to do anything, because it already has both files configured.

Options

-You can modify the look and behavior of the module pages by passing the following options to `AuditLoggingModule.forLazy` static method: +You can modify the look and behavior of the module pages by passing the following options to `createRoutes` static method: - **entityActionContributors:** Changes grid actions. Please check [Entity Action Extensions for Angular](../framework/ui/angular/entity-action-extensions.md) for details. - **toolbarActionContributors:** Changes page toolbar. Please check [Page Toolbar Extensions for Angular](../framework/ui/angular/page-toolbar-extensions.md) for details. diff --git a/docs/en/modules/chat.md b/docs/en/modules/chat.md index 589980ec98..42379b29bc 100644 --- a/docs/en/modules/chat.md +++ b/docs/en/modules/chat.md @@ -206,38 +206,33 @@ See the [connection strings](../framework/fundamentals/connection-strings.md) do #### Installation -In order to configure the application to use the `ChatModule`, you first need to import `ChatConfigModule` from `@volo/abp.ng.chat/config` to root module. `ChatConfigModule` has a static `forRoot` method which you should call for a proper configuration. +In order to configure the application to use the chat module, you first need to import `provideChatConfig` from `@volo/abp.ng.chat/config` to root application confiuration. Then, you will need to append it to the `appConfig` array. ```js -// app.module.ts -import { ChatConfigModule } from '@volo/abp.ng.chat/config'; - -@NgModule({ - imports: [ - // other imports - ChatConfigModule.forRoot(), - // other imports +// app.config.ts +import { provideChatConfig } from '@volo/abp.ng.chat/config'; + +export const appConfig: ApplicationConfig = { + providers: [ + // ... + provideChatConfig(), ], - // ... -}) -export class AppModule {} +}; + ``` -The `ChatModule` should be imported and lazy-loaded in your routing module. It has a static `forLazy` method for configuration. It is available for import from `@volo/abp.ng.chat`. +The chat module should be imported and lazy-loaded in your routing array. It has a static `createRoutes` method for configuration. It is available for import from `@volo/abp.ng.chat`. ```js -// app-routing.module.ts -const routes: Routes = [ - // other route definitions +// app.routes.ts +const APP_ROUTES: Routes = [ + // ... { path: 'chat', loadChildren: () => - import('@volo/abp.ng.chat').then(m => m.ChatModule.forLazy(/* options here */)), + import('@volo/abp.ng.chat').then(c => c.createRoutes(/* options here */)), }, ]; - -@NgModule(/* AppRoutingModule metadata */) -export class AppRoutingModule {} ``` #### Services / Models diff --git a/docs/en/modules/gdpr.md b/docs/en/modules/gdpr.md index bef763a41a..43e38eb6b2 100644 --- a/docs/en/modules/gdpr.md +++ b/docs/en/modules/gdpr.md @@ -177,45 +177,46 @@ See the [connection strings](../framework/fundamentals/connection-strings.md) do ### Installation -In order to configure the application to use the `GdprModule`, you first need to import `GdprConfigModule` from `@volo/abp.ng.gdpr/config` to the root module. `GdprConfigModule` has a static `forRoot` method which you should call for a proper configuration. +In order to configure the application to use the gdpr module, you first need to import `provideGdprConfig` from `@volo/abp.ng.gdpr/config` to the root configuration. Then, you will need to append it to the `appConfig` array. ```js -// app.module.ts -import { GdprConfigModule } from '@volo/abp.ng.gdpr/config'; - -@NgModule({ - imports: [ - // other imports - GdprConfigModule.forRoot(), - // other imports +// app.config.ts +import { + provideGdprConfig, + withCookieConsentOptions, +} from '@volo/abp.ng.gdpr/config'; + +export const appConfig: ApplicationConfig = { + providers: [ + provideGdprConfig( + withCookieConsentOptions({ + cookiePolicyUrl: '/gdpr-cookie-consent/cookie', + privacyPolicyUrl: '/gdpr-cookie-consent/privacy', + }), + ), ], - // ... -}) -export class AppModule {} +}; ``` -The `GdprModule` should be imported and lazy-loaded in your routing module. It has a static `forLazy` method for configuration. Available options are listed below. It is available for import from `@volo/abp.ng.gdpr`. +The gdpr module should be imported and lazy-loaded in your routing array. It has a static `createRoutes` method for configuration. Available options are listed below. It is available for import from `@volo/abp.ng.gdpr`. ```js -// app-routing.module.ts -const routes: Routes = [ +// app.routes.ts +const APP_ROUTES: Routes = [ // other route definitions { path: 'gdpr', loadChildren: () => - import('@volo/abp.ng.gdpr').then(m => m.GdprModule.forLazy(/* options here */)), + import('@volo/abp.ng.gdpr').then(c => c.createRoutes(/* options here */)), }, ]; - -@NgModule(/* AppRoutingModule metadata */) -export class AppRoutingModule {} ``` -> If you have generated your project via the startup template, you do not have to do anything, because it already has both `GdprConfigModule` and `GdprModule`. +> If you have generated your project via the startup template, you do not have to do anything, because it already has both files configured.

Options

-You can modify the look and behavior of the module pages by passing the following options to the `GdprModule.forLazy` static method: +You can modify the look and behavior of the module pages by passing the following options to the `createRoutes` static method: - **entityActionContributors:** Changes the grid actions. Please check [Entity Action Extensions for Angular](../framework/ui/angular/entity-action-extensions.md) for details. - **toolbarActionContributors:** Changes the page toolbar. Please check [Page Toolbar Extensions for Angular](../framework/ui/angular/page-toolbar-extensions.md) for details. diff --git a/docs/en/modules/identity-pro.md b/docs/en/modules/identity-pro.md index ab25a8d5c8..6649a335e3 100644 --- a/docs/en/modules/identity-pro.md +++ b/docs/en/modules/identity-pro.md @@ -343,45 +343,39 @@ See the `IdentityPermissions` class members for all permissions defined for this #### Installation -In order to configure the application to use the `IdentityModule`, you first need to import `IdentityConfigModule` from `@volo/abp.ng.identity/config` to root module. `IdentityConfigModule` has a static `forRoot` method which you should call for a proper configuration. +In order to configure the application to use the identity module, you first need to import `provideIdentityConfig` from `@volo/abp.ng.identity/config` to root configuration. Then, you will need to append it to the `appConfig` array. ```js -// app.module.ts -import { IdentityConfigModule } from '@volo/abp.ng.identity/config'; - -@NgModule({ - imports: [ - // other imports - IdentityConfigModule.forRoot(), - // other imports +// app.config.ts +import { provideIdentityConfig } from '@volo/abp.ng.identity/config'; + +export const appConfig: ApplicationConfig = { + providers: [ + // ... + provideIdentityConfig(), ], - // ... -}) -export class AppModule {} +}; ``` -The `IdentityModule` should be imported and lazy-loaded in your routing module. It has a static `forLazy` method for configuration. Available options are listed below. It is available for import from `@volo/abp.ng.identity`. +The identity module should be imported and lazy-loaded in your routing configuration. It has a static `createRoutes` method for configuration. Available options are listed below. It is available for import from `@volo/abp.ng.identity`. ```js -// app-routing.module.ts -const routes: Routes = [ - // other route definitions +// app.routes.ts +const APP_ROUTES: Routes = [ + // ... { path: 'identity', loadChildren: () => - import('@volo/abp.ng.identity').then(m => m.IdentityModule.forLazy(/* options here */)), + import('@volo/abp.ng.identity').then(c => c.createRoutes(/* options here */)), }, ]; - -@NgModule(/* AppRoutingModule metadata */) -export class AppRoutingModule {} ``` -> If you have generated your project via the startup template, you do not have to do anything, because it already has both `IdentityConfigModule` and `IdentityModule`. +> If you have generated your project via the startup template, you do not have to do anything, because it already has both configurations added.

Options

-You can modify the look and behavior of the module pages by passing the following options to `IdentityModule.forLazy` static method: +You can modify the look and behavior of the module pages by passing the following options to `createRoutes` static method: - **entityActionContributors:** Changes grid actions. Please check [Entity Action Extensions for Angular](../framework/ui/angular/entity-action-extensions.md) for details. - **toolbarActionContributors:** Changes page toolbar. Please check [Page Toolbar Extensions for Angular](../framework/ui/angular/page-toolbar-extensions.md) for details. diff --git a/docs/en/modules/identity-server-pro.md b/docs/en/modules/identity-server-pro.md index ce25823ee8..ad197e8a7d 100644 --- a/docs/en/modules/identity-server-pro.md +++ b/docs/en/modules/identity-server-pro.md @@ -245,45 +245,39 @@ See the `AbpIdentityServerPermissions` class members for all permissions defined #### Installation -In order to configure the application to use the `IdentityServerModule`, you first need to import `IdentityServerConfigModule` from `@volo/abp.ng.identity-server/config` to root module. `IdentityServerConfigModule` has a static `forRoot` method which you should call for a proper configuration. +In order to configure the application to use the identity server, you first need to import `provideIdentityServerConfig` from `@volo/abp.ng.identity-server/config` to root configuration. Then, you will need to append it to the `appConfig` array. ```js -// app.module.ts -import { IdentityServerConfigModule } from '@volo/abp.ng.identity-server/config'; - -@NgModule({ - imports: [ - // other imports - IdentityServerConfigModule.forRoot(), - // other imports +// app.config.ts +import { provideIdentityServerConfig } from '@volo/abp.ng.identity-server/config'; + +export const appConfig: ApplicationConfig = { + providers: [ + // ... + provideIdentityServerConfig() ], - // ... -}) -export class AppModule {} +}; ``` -The `IdentityServerModule` should be imported and lazy-loaded in your routing module. It has a static `forLazy` method for configuration. Available options are listed below. It is available for import from `@volo/abp.ng.identity-server`. +The identity server module should be imported and lazy-loaded in your routing module. It has a static `creatRoutes` method for configuration. Available options are listed below. It is available for import from `@volo/abp.ng.identity-server`. ```js -// app-routing.module.ts -const routes: Routes = [ +// app.routes.ts +const APP_ROUTES: Routes = [ // other route definitions { path: 'identity-server', loadChildren: () => - import('@volo/abp.ng.identity-server').then(m => m.IdentityServerModule.forLazy(/* options here */)), + import('@volo/abp.ng.identity-server').then(c => c.createRoutes(/* options here */)), }, ]; - -@NgModule(/* AppRoutingModule metadata */) -export class AppRoutingModule {} ``` -> If you have generated your project via the startup template, you do not have to do anything, because it already has both `IdentityServerConfigModule` and `IdentityServerModule`. +> If you have generated your project via the startup template, you do not have to do anything, because it already has both files configured.

Options

-You can modify the look and behavior of the module pages by passing the following options to `IdentityServerModule.forLazy` static method: +You can modify the look and behavior of the module pages by passing the following options to `createRoutes` static method: - **entityActionContributors:** Changes grid actions. Please check [Entity Action Extensions for Angular](../framework/ui/angular/entity-action-extensions.md) for details. - **toolbarActionContributors:** Changes page toolbar. Please check [Page Toolbar Extensions for Angular](../framework/ui/angular/page-toolbar-extensions.md) for details. diff --git a/docs/en/modules/language-management.md b/docs/en/modules/language-management.md index 62327378a4..536abc7ab3 100644 --- a/docs/en/modules/language-management.md +++ b/docs/en/modules/language-management.md @@ -149,45 +149,41 @@ See the `LanguageManagementPermissions` class members for all permissions define #### Installation -To configure the application to use the `LanguageManagementModule`, you first need to import `LanguageManagementConfigModule` from `@volo/abp.ng.language-management/config` to root module. `LanguageManagementConfigModule` has a static `forRoot` method which you should call for a proper configuration. +To configure the application to use the language management module, you first need to import `provideLanguageManagementConfig` from `@volo/abp.ng.language-management/config` to root configuration. Then, you will need to append it to the `appConfig` array. ```js -// app.module.ts -import { LanguageManagementConfigModule } from '@volo/abp.ng.language-management/config'; - -@NgModule({ - imports: [ - // other imports - LanguageManagementConfigModule.forRoot(), - // other imports +// app.config.ts +import { provideLanguageManagementConfig } from '@volo/abp.ng.language-management/config'; + +export const appConfig: ApplicationConfig = { + providers: [ + // ... + provideLanguageManagementConfig() ], - // ... -}) -export class AppModule {} +}; + ``` -The `LanguageManagementModule` should be imported and lazy-loaded in your routing module. It has a static `forLazy` method for configuration. Available options are listed below. It is available for import from `@volo/abp.ng.language-management`. +The language management module should be imported and lazy-loaded in your routing array. It has a static `createRoutes` method for configuration. Available options are listed below. It is available for import from `@volo/abp.ng.language-management`. ```js -// app-routing.module.ts -const routes: Routes = [ - // other route definitions +// app.routes.ts + +const APP_ROUTES: Routes = [ + // ... { path: 'language-management', loadChildren: () => - import('@volo/abp.ng.language-management').then(m => m.LanguageManagementModule.forLazy(/* options here */)), + import('@volo/abp.ng.language-management').then(c => c.createRoutes(/* options here */)), }, ]; - -@NgModule(/* AppRoutingModule metadata */) -export class AppRoutingModule {} ``` -> If you have generated your project via the startup template, you do not have to do anything because it already has both `LanguageManagementConfigModule` and `LanguageManagementModule`. +> If you have generated your project via the startup template, you do not have to do anything because it already has both configurations implemented.

Options

-You can modify the look and behavior of the module pages by passing the following options to `LanguageManagementModule.forLazy` static method: +You can modify the look and behavior of the module pages by passing the following options to `createRoutes` static method: - **entityActionContributors:** Changes grid actions. Please check [Entity Action Extensions for Angular](../framework/ui/angular/entity-action-extensions.md) for details. - **toolbarActionContributors:** Changes page toolbar. Please check [Page Toolbar Extensions for Angular](../framework/ui/angular/page-toolbar-extensions.md) for details. diff --git a/docs/en/modules/payment.md b/docs/en/modules/payment.md index b3fb6de84b..6a55cc83ae 100644 --- a/docs/en/modules/payment.md +++ b/docs/en/modules/payment.md @@ -81,38 +81,36 @@ This page is used to send Name, Surname and Email Address of user to PayU. #### Installation -In order to configure the application to use the `PaymentModule`, you first need to import `PaymentAdminConfigModule` from `@volo/abp.ng.payment/admin/config` to the root module. `PaymentAdminConfigModule` has a static `forRoot` method which you should call for a proper configuration: +In order to configure the application to use the payment module, you first need to import `PaymentAdminConfigModule` from `@volo/abp.ng.payment/admin/config` to the root configuration. `PaymentAdminConfigModule` has a static `forRoot` method which you should call for a proper configuration: ```js -// app.module.ts +// app.config.ts +import { ApplicationConfig, importProvidersFrom } from '@angular/core'; import { PaymentAdminConfigModule } from '@volo/abp.ng.payment/admin/config'; -@NgModule({ - imports: [ - // other imports - PaymentAdminConfigModule.forRoot(), - // other imports +export const appConfig: ApplicationConfig = { + providers: [ + // ... + importProvidersFrom([ + PaymentAdminConfigModule.forRoot() + ]), ], - // ... -}) -export class AppModule {} +}; + ``` -The `PaymentAdminModule` should be imported and lazy-loaded in your routing module as below: +The payment admin module should be imported and lazy-loaded in your routing array as below: ```js -// app-routing.module.ts -const routes: Routes = [ - // other route definitions +// app.routes.ts +const APP_ROUTES: Routes = [ + // ... { path: 'payment', loadChildren: () => - import('@volo/abp.ng.payment/admin').then(m => m.PaymentAdminModule.forLazy()), + import('@volo/abp.ng.payment/admin').then(c => c.createRoutes()), }, ]; - -@NgModule(/* AppRoutingModule metadata */) -export class AppRoutingModule {} ``` #### Payment plans page diff --git a/docs/en/modules/saas.md b/docs/en/modules/saas.md index bfd0115853..f1e85d6ceb 100644 --- a/docs/en/modules/saas.md +++ b/docs/en/modules/saas.md @@ -244,45 +244,39 @@ See the `SaasHostPermissions` class members for all permissions defined for this #### Installation -In order to configure the application to use the `SaasModule`, you first need to import `SaasConfigModule` from `@volo/abp.ng.saas/config` to root module. `SaasConfigModule` has a static `forRoot` method which you should call for a proper configuration. +In order to configure the application to use the saas module, you first need to import `provideSaasConfig` from `@volo/abp.ng.saas/config` to root module. Then, you will need to append it to the `appConfig` array. ```js -// app.module.ts -import { SaasConfigModule } from '@volo/abp.ng.saas/config'; - -@NgModule({ - imports: [ - // other imports - SaasConfigModule.forRoot(), - // other imports +// app.config.ts +import { provideSaasConfig } from '@volo/abp.ng.saas/config'; + +export const appConfig: ApplicationConfig = { + providers: [ + // ... + provideSaasConfig(), ], - // ... -}) -export class AppModule {} +}; ``` -The `SaasModule` should be imported and lazy-loaded in your routing module. It has a static `forLazy` method for configuration. Available options are listed below. It is available for import from `@volo/abp.ng.saas`. +The saas module should be imported and lazy-loaded in your routing configuration. It has a static `createRoutes` method for configuration. Available options are listed below. It is available for import from `@volo/abp.ng.saas`. ```js -// app-routing.module.ts -const routes: Routes = [ - // other route definitions +// app.routes.ts +const APP_ROUTES: Routes = [ + // ... { path: 'saas', loadChildren: () => - import('@volo/abp.ng.saas').then(m => m.SaasModule.forLazy(/* options here */)), + import('@volo/abp.ng.saas').then(c => c.createRoutes(/* options here */)), }, ]; - -@NgModule(/* AppRoutingModule metadata */) -export class AppRoutingModule {} ``` -> If you have generated your project via the startup template, you do not have to do anything, because it already has both `SaasConfigModule` and `SaasModule`. +> If you have generated your project via the startup template, you do not have to do anything, because it already has both configurations implemented.

Options

-You can modify the look and behavior of the module pages by passing the following options to `SaasModule.forLazy` static method: +You can modify the look and behavior of the module pages by passing the following options to `createRoutes` static method: - **entityActionContributors:** Changes grid actions. Please check [Entity Action Extensions for Angular](../framework/ui/angular/entity-action-extensions.md) for details. - **toolbarActionContributors:** Changes page toolbar. Please check [Page Toolbar Extensions for Angular](../framework/ui/angular/page-toolbar-extensions.md) for details. diff --git a/docs/en/modules/text-template-management.md b/docs/en/modules/text-template-management.md index 9b2235314f..7f045cd8e1 100644 --- a/docs/en/modules/text-template-management.md +++ b/docs/en/modules/text-template-management.md @@ -162,45 +162,39 @@ See the `TextTemplateManagementPermissions` class members for all permissions de #### Installation -In order to configure the application to use the `TextTemplateManagementModule`, you first need to import `TextTemplateManagementConfigModule` from `@volo/abp.ng.text-template-management/config` to root module. `TextTemplateManagementConfigModule` has a static `forRoot` method which you should call for a proper configuration. +In order to configure the application to use the text template management module, you first need to import `provideTextTemplateManagementConfig` from `@volo/abp.ng.text-template-management/config` to root configuration. Then, you will need to append it to the `appConfig` array. ```js -// app.module.ts -import { TextTemplateManagementConfigModule } from '@volo/abp.ng.text-template-management/config'; - -@NgModule({ - imports: [ - // other imports - TextTemplateManagementConfigModule.forRoot(), - // other imports +// app.config.ts +import { provideTextTemplateManagementConfig } from '@volo/abp.ng.text-template-management/config'; + +export const appConfig: ApplicationConfig = { + providers: [ + // ... + provideTextTemplateManagementConfig() ], - // ... -}) -export class AppModule {} +}; ``` -The `TextTemplateManagementModule` should be imported and lazy-loaded in your routing module. It has a static `forLazy` method for configuration. Available options are listed below. It is available for import from `@volo/abp.ng.text-template-management`. +The text template management module should be imported and lazy-loaded in your routing array. It has a static `createRoutes` method for configuration. Available options are listed below. It is available for import from `@volo/abp.ng.text-template-management`. ```js -// app-routing.module.ts -const routes: Routes = [ - // other route definitions +// app.routes.ts +const APP_ROUTES: Routes = [ + // ... { path: 'text-template-management', loadChildren: () => - import('@volo/abp.ng.text-template-management').then(m => m.TextTemplateManagementModule.forLazy(/* options here */)), + import('@volo/abp.ng.text-template-management').then(c => c.createRoutes(/* options here */)), }, ]; - -@NgModule(/* AppRoutingModule metadata */) -export class AppRoutingModule {} ``` -> If you have generated your project via the startup template, you do not have to do anything, because it already has both `TextTemplateManagementConfigModule` and `TextTemplateManagementModule`. +> If you have generated your project via the startup template, you do not have to do anything, because it already has both configurations implemented.

Options

-You can modify the look and behavior of the module pages by passing the following options to `TextTemplateManagementModule.forLazy` static method: +You can modify the look and behavior of the module pages by passing the following options to `createRoutes` static method: - **entityActionContributors:** Changes grid actions. Please check [Entity Action Extensions for Angular](../framework/ui/angular/entity-action-extensions.md) for details. - **toolbarActionContributors:** Changes page toolbar. Please check [Page Toolbar Extensions for Angular](../framework/ui/angular/page-toolbar-extensions.md) for details.