Browse Source

Merge pull request #20783 from abpframework/documentpatch

Update How Replaceable Components Work with Extensions document
pull/20788/head
sumeyye 1 year ago
committed by GitHub
parent
commit
00eadba280
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 9
      docs/en/framework/ui/angular/how-replaceable-components-work-with-extensions.md

9
docs/en/framework/ui/angular/how-replaceable-components-work-with-extensions.md

@ -18,7 +18,8 @@ Open the generated `src/app/my-roles/my-roles.component.ts` file and replace its
```js ```js
import { ListService, PagedAndSortedResultRequestDto, PagedResultDto } from '@abp/ng.core'; import { ListService, PagedAndSortedResultRequestDto, PagedResultDto } from '@abp/ng.core';
import { eIdentityComponents, IdentityRoleDto, IdentityRoleService, RolesComponent } from '@abp/ng.identity'; import { eIdentityComponents, RolesComponent } from '@abp/ng.identity';
import { IdentityRoleDto, IdentityRoleService } from '@abp/ng.identity/proxy';
import { ePermissionManagementComponents } from '@abp/ng.permission-management'; import { ePermissionManagementComponents } from '@abp/ng.permission-management';
import { Confirmation, ConfirmationService } from '@abp/ng.theme.shared'; import { Confirmation, ConfirmationService } from '@abp/ng.theme.shared';
import { import {
@ -232,7 +233,7 @@ We have added the `abp-page-toolbar`, `abp-extensible-table`, and `abp-extensibl
You should import the required modules for the `MyRolesComponent` to `MyRolesModule`. Open the `src/my-roles/my-roles.module.ts` file and replace the content with the following: You should import the required modules for the `MyRolesComponent` to `MyRolesModule`. Open the `src/my-roles/my-roles.module.ts` file and replace the content with the following:
```js ```js
import { UiExtensionsModule } from '@abp/ng.theme.shared/extensions'; import { ExtensibleModule } from '@abp/ng.components/extensible';
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { SharedModule } from '../shared/shared.module'; import { SharedModule } from '../shared/shared.module';
import { MyRolesComponent } from './my-roles.component'; import { MyRolesComponent } from './my-roles.component';
@ -240,13 +241,13 @@ import { PermissionManagementModule } from '@abp/ng.permission-management';
@NgModule({ @NgModule({
declarations: [MyRolesComponent], declarations: [MyRolesComponent],
imports: [SharedModule, UiExtensionsModule, PermissionManagementModule], imports: [SharedModule, ExtensibleModule, PermissionManagementModule],
exports: [MyRolesComponent], exports: [MyRolesComponent],
}) })
export class MyRolesModule {} export class MyRolesModule {}
``` ```
- `UiExtensionsModule` imported to be able to use the extension components in your component. - `ExtensionsModule` imported to be able to use the extension components in your component.
- `PermissionManagementModule` imported to be able to use the `abp-permission-*management` in your component. - `PermissionManagementModule` imported to be able to use the `abp-permission-*management` in your component.
As the last step, it is needs to be replaced the `RolesComponent` with the `MyRolesComponent`. Open the `app.component.ts` and modify its content as shown below: As the last step, it is needs to be replaced the `RolesComponent` with the `MyRolesComponent`. Open the `app.component.ts` and modify its content as shown below:

Loading…
Cancel
Save