Modal calling in Angular 9

Topic: Modal calling in Angular 9

Marc asked 2 years ago

I am receiving a Can't bind to 'role' since it isn't a known property of 'null' on the modal call in typescript: this.modalRef =, modalOptions);

enter image description here

This is on all modal calls.

Konrad Stępień staff commented 2 years ago

Can you provide more of your code?

Marc commented 2 years ago

Add(parentID: number): void {

var newEntity = new SettingOutputDto()
newEntity.featureId = this.mainEntityID;

newEntity.settingNotes = "";
newEntity.powerAdmin = false;
newEntity.systemAdmin = false;
newEntity.rootTenant = false;

var modalOptions = this.pageLayout.modalOptions; = {
    editSavingMode: false,
    entity: newEntity,
    pageLayout: this.pageLayout,
    parentId: parentID,
    settingTypeOptions: this.settingTypeOptions,
    settingEntityOptions: this.settingEntitytOptions,
    typePageId: this.typePageId,
    typeLookupId: this.typeLookupId,
    typeRadioId: this.typeRadioId,
    typeTextId: this.typeTextId

this.modalRef =, modalOptions);

this.modalRef.content.action.subscribe( (result: boolean) => { 
  if (result) {
    this.toastrService.success(this.pageLayout.entityName + ' has been successfully added', '', { positionClass:'toast-custom' });


Konrad Stępień staff commented 2 years ago

Can you send me your project on my mail?

I can't restore your issue.

Olivier Flegeau commented 2 years ago

I have the same issue since i upgrade in Angular 9.0.0

Konrad Stępień staff commented 2 years ago

@Olivier Flegeau can you also send me your project on email? Or please provide me the solution to how I can reproduce your problem.

Miresh pro premium priority commented 2 years ago


My project is over 200mb and will be difficult to send through. I will try and replicate and send through

Arkadiusz Idzikowski staff commented 2 years ago

Thank you, an example project is not needed anymore because we managed to reproduce this problem on our end. We will take closer look at that and add a fix as soon as possible.

Please insert min. 20 characters.


Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.



Specification of the issue
  • User: Free
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: 9.0.0
  • Device: Laptop
  • Browser: Chrome
  • OS: Windows
  • Provided sample code: No
  • Provided link: No