如何将两个以上的参数传递给modal ng2 bootstrap

问题描述 投票:0回答:1

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

 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

javascript angular typescript bootstrap-modal ng2-bootstrap
1个回答
1
投票

你必须添加

isHistoryModel:boolean

进入你的

ModalDialogModel
© www.soinside.com 2019 - 2024. All rights reserved.