how to pass more than two parameters to modal ng2 bootstrap

129 Views Asked by At

I have to pass a flag in my Dialog Component. It must be like this

 this.dialogService.addDialog(ModalDialogComponent, { title: 'History', message: this.comments, isHistoryModel:true});

My ModalDialogComponent:

export class ModalDialogComponent extends DialogComponent < ModalDialogModel, null > implements ModalDialogModel {
    title: string;
    message: any;
    isHistoryModel: boolean;
    constructor(dialogService: DialogService) {
        super(dialogService);
    }
}

Error snapshot: enter image description here

1

There are 1 best solutions below

1
holydragon On

You have to add

isHistoryModel:boolean

into your

ModalDialogModel