Topic: Modal calling in Angular 9

Marc free asked 4 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 = this.modalService.show(SettingsModalComponent, modalOptions);

enter image description here

This is on all modal calls.


Konrad Stępień staff commented 4 years ago

Can you provide more of your code?


Marc free commented 4 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;
modalOptions.data = {
    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 = this.modalService.show(SettingsModalComponent, modalOptions);

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

}


Konrad Stępień staff commented 4 years ago

Can you send me your project on my mail? k.stepien@mdbootstrap.com

I can't restore your issue.


Olivier Flegeau free commented 4 years ago

I have the same issue since i upgrade in Angular 9.0.0


Konrad Stępień staff commented 4 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 priority commented 4 years ago

Hi,

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


Arkadiusz Idzikowski staff commented 4 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.

FREE CONSULTATION

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

Status

Opened

Specification of the issue

  • ForumUser: 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
Tags