如何将两个以上参数传递给模态ng2引导程序

时间:2019-02-28 07:39:35

标签: javascript angular typescript bootstrap-modal ng2-bootstrap

我必须在我的对话框组件中传递一个标志。一定是这样

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

我的ModalDialogComponent:

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

错误快照: enter image description here

1 个答案:

答案 0 :(得分:1)

您必须添加

isHistoryModel:boolean

进入您的

ModalDialogModel