BEST
DEALS
OF THE
YEAR!
SAVE UP TO $3,000
24 NOV
1 DEC
00 Days
00 Hrs
00 Min
00 Sec
Open Closed

replace RolesComponent then error #10123


User avatar
0
jacky_me created

<abp-page [title]="'AbpIdentity::Roles' | abpLocalization" [toolbar]="data.items"> <div id="identity-roles-wrapper" class="card"> <div class="card-body"> <abp-extensible-table [data]="data.items" [recordsTotal]="data.totalCount" [list]="list" ></abp-extensible-table> </div> </div>

<abp-modal [(visible)]="isModalVisible" [busy]="modalBusy"> <ng-template #abpHeader> <h3>{{ (selected?.id ? 'AbpIdentity::Edit' : 'AbpIdentity::NewRole') | abpLocalization }}</h3> </ng-template>

&lt;ng-template #abpBody&gt;
  &lt;form [formGroup]=&quot;form&quot; (ngSubmit)=&quot;save()&quot; [validateOnSubmit]=&quot;true&quot;&gt;
    &lt;abp-extensible-form [selectedRecord]=&quot;selected&quot;&gt;&lt;/abp-extensible-form&gt;
  &lt;/form&gt;
&lt;/ng-template&gt;

&lt;ng-template #abpFooter&gt;
  &lt;button type=&quot;button&quot; class=&quot;btn btn-outline-primary&quot; abpClose&gt;
    {{ 'AbpIdentity::Cancel' | abpLocalization }}
  &lt;/button&gt;
  &lt;abp-button iconClass=&quot;fa fa-check&quot; [disabled]=&quot;form?.invalid&quot; (click)=&quot;save()&quot;&gt;{{
    'AbpIdentity::Save' | abpLocalization
    }}&lt;/abp-button&gt;
&lt;/ng-template&gt;

</abp-modal>

<abp-permission-management #abpPermissionManagement="abpPermissionManagement" *abpReplaceableTemplate=" { inputs: { providerName: { value: 'R' }, providerKey: { value: providerKey }, visible: { value: visiblePermissions, twoWay: true }, hideBadges: { value: true } }, outputs: { visibleChange: onVisiblePermissionChange }, componentKey: permissionManagementKey }; let init = initTemplate " (abpInit)="init(abpPermissionManagement)" > </abp-permission-management> </abp-page>

Can't bind to 'abpReplaceableTemplate' since it isn't a known property of 'abp-permission-management' (used in the 'RolesManagementComponent' component template).

  1. If 'abp-permission-management' is an Angular component and it has the 'abpReplaceableTemplate' input, then verify that it is included in the '@Component.imports' of this component.
  2. If 'abp-permission-management' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@Component.schemas' of this component to suppress this message.
  3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@Component.schemas' of this component.

5 Answer(s)
  • User Avatar
    0
    AI-Bot created
    Support Team ABP Agent
    1. Solution
    • Open-source ABP Angular components (e.g., abp-modal, page toolbar, extensible table, advanced filters) live in the ABP Framework repo under the Angular packages. You can browse, copy, or extend them:
      • Repository path:
        • npm/ng-packs/packages/theme-shared → shared UI components (e.g., abp-modal, buttons, page toolbars)
        • Other Angular packages are under npm/ng-packs/packages as well
    • Steps to obtain and customize:
      1. Browse the source
        • Go to the ABP repo’s Angular packages and locate the component folder (for example, modal.component.* under theme-shared).
      2. Copy into your app
        • Create your own Angular component in your app, copy the template/ts/scss as a starting point, and adjust as needed.
      3. Replace (if using theme components)
        • If the component is used via the theme and supports replacement, register your custom component with the app’s replaceable/override mechanism where applicable (for LeptonX, use ReplaceableComponentsService with the correct key).
      4. Build and import
        • Make sure to import any dependent modules/services used by the original component (e.g., NgbModal, ABP services).
    • Commercial-only Angular components
      • If the component belongs to the commercial UI packages, you can fetch the source via:
        • ABP Suite → Download LeptonX source if you need to customize LeptonX theme components.
        • Or install the commercial Angular UI package with source code: abp add-package @volo/abp.commercial.ng.ui --with-source-code
    • Using ABP Angular UI docs to identify components and usage
      • Check the Angular UI overview and component sections to identify component names and packages, then locate them in the repo path above.
    1. Sources
    • Validated links only:
      • ABP Framework GitHub (Angular packages root): https://github.com/abpframework/abp/tree/dev/npm/ng-packs/packages
      • ABP Framework GitHub (repo root): https://github.com/abpframework/abp
      • ABP Commercial portal (Suite/source access info): https://commercial.abp.io

    This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.

  • User Avatar
    0
    sumeyye.kurtulus created
    Support Team Angular Expert

    Hello,

    Normally, you should be able to replace the components by following the documentation here: https://abp.io/docs/latest/framework/ui/angular/component-replacement

    Could you please provide the steps to reproduce the issue, along with the ABP version you are using?

    Thank you for your cooperation.

  • User Avatar
    0
    jacky_me created

    [sumeyye.kurtulus] said: Hello,

    Normally, you should be able to replace the components by following the documentation here: https://abp.io/docs/latest/framework/ui/angular/component-replacement

    Could you please provide the steps to reproduce the issue, along with the ABP version you are using?

    Thank you for your cooperation.

    abp 9.3.1

    replace rolescomponent and permissionmanagementcomponent then error click then error

  • User Avatar
    0
    sumeyye.kurtulus created
    Support Team Angular Expert

    Hello,

    Thank you for providing extra details about your problem. I have checked these replacements and the flow needs to be working fine. However, it depends on how you have replaced these components. Could you clarify whether you have connected the source code?

  • User Avatar
    0
    jacky_me created

    I copy code from source code

    RolesComponent

    import { InitDirective, ListService, LocalizationPipe, PagedAndSortedResultRequestDto, PagedResultDto, ReplaceableTemplateDirective } from '@abp/ng.core'; import { IdentityRoleDto, IdentityRoleService } from '@abp/ng.identity/proxy'; import { ePermissionManagementComponents, PermissionManagementComponent, } from '@abp/ng.permission-management'; import { ButtonComponent, Confirmation, ConfirmationService, ModalCloseDirective, ModalComponent, ToasterService, } from '@abp/ng.theme.shared'; import { ExtensibleFormComponent, ExtensibleTableComponent, EXTENSIONS_IDENTIFIER, FormPropData, generateFormFromProps, } from '@abp/ng.components/extensible'; import { Component, inject, Injector, OnInit } from '@angular/core'; import { ReactiveFormsModule, UntypedFormGroup } from '@angular/forms'; import { finalize } from 'rxjs/operators'; import { eIdentityComponents, RolesComponent } from '@abp/ng.identity'; import { PageComponent } from '@abp/ng.components/page'; import { NgxValidateCoreModule } from '@ngx-validate/core';

    @Component({ selector: 'app-rolescomponent', templateUrl: './roles-management.component.html', providers: [ ListService, { provide: EXTENSIONS_IDENTIFIER, useValue: eIdentityComponents.Roles, }, { provide: RolesComponent, useExisting: RolesManagementComponent, }, ], imports: [ ReactiveFormsModule, LocalizationPipe, ExtensibleTableComponent, ModalComponent, ButtonComponent, PageComponent, ExtensibleFormComponent, ModalCloseDirective, PermissionManagementComponent, ReplaceableTemplateDirective, NgxValidateCoreModule, InitDirective, ], }) export class RolesManagementComponent implements OnInit { protected readonly list = inject(ListService<PagedAndSortedResultRequestDto>); protected readonly confirmationService = inject(ConfirmationService); protected readonly toasterService = inject(ToasterService); private readonly injector = inject(Injector); protected readonly service = inject(IdentityRoleService);

    data: PagedResultDto<IdentityRoleDto> = { items: [], totalCount: 0 }; form!: UntypedFormGroup; selected?: IdentityRoleDto; isModalVisible!: boolean; visiblePermissions = false; providerKey?: string; modalBusy = false; permissionManagementKey = ePermissionManagementComponents.PermissionManagement;

    onVisiblePermissionChange = (event: boolean) => { this.visiblePermissions = event; };

    ngOnInit() { this.hookToQuery(); }

    buildForm() { const data = new FormPropData(this.injector, this.selected); this.form = generateFormFromProps(data); }

    openModal() { this.buildForm(); this.isModalVisible = true; }

    add() { this.selected = {} as IdentityRoleDto; this.openModal(); }

    edit(id: string) { this.service.get(id).subscribe(res => { this.selected = res; this.openModal(); }); }

    save() { if (!this.form.valid) return; this.modalBusy = true;

    const { id } = this.selected || {};
    (id
      ? this.service.update(id, { ...this.selected, ...this.form.value })
      : this.service.create(this.form.value)
    )
      .pipe(finalize(() => (this.modalBusy = false)))
      .subscribe(() => {
        this.isModalVisible = false;
        this.toasterService.success('AbpUi::SavedSuccessfully');
        this.list.get();
      });
    

    }

    delete(id: string, name: string) { this.confirmationService .warn('AbpIdentity::RoleDeletionConfirmationMessage', 'AbpIdentity::AreYouSure', { messageLocalizationParams: [name], }) .subscribe((status: Confirmation.Status) => { if (status === Confirmation.Status.confirm) { this.toasterService.success('AbpUi::DeletedSuccessfully'); this.service.delete(id).subscribe(() => this.list.get()); } }); }

    private hookToQuery() { this.list .hookToQuery(query => this.service.getList(query)) .subscribe(res => { this.data = res; }); }

    openPermissionsModal(providerKey: string) { this.providerKey = providerKey; setTimeout(() => { this.visiblePermissions = true; }, 0); }

    sort(data: any) { const { prop, dir } = data.sorts[0]; this.list.sortKey = prop; this.list.sortOrder = dir; } }

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.1.0-preview. Updated on November 20, 2025, 09:12
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.