javascript - 如何将两个以上的参数传递给模态 ng2 bootstrap

标签 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

最佳答案

您必须添加

isHistoryModel:boolean

进入你的

ModalDialogModel

关于javascript - 如何将两个以上的参数传递给模态 ng2 bootstrap,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54920652/

相关文章:

javascript - 绑定(bind)到动态元素

javascript - 使用 Angular 2 响应式(Reactive)表单通过单个复选框提交多个值

css - 有 Angular Dynamic Form Generator Bootstrap CSS 问题

angular - 如何在 Ionic 2 中从一个数字增加/减少到另一个显示它们之间的数字?

javascript - 如何在 React styled-components 中禁用 styled.button?

reactjs - 代码覆盖率 Cypress 和 Storybook,无法检测我的代码

javascript - 将 JavaScript 文字传递给 :onclick 时,Thymeleaf 找不到我的变量

javascript - 如何访问和遍历嵌套数组

javascript - UInt8Array() 最大值是多少?

angular - RxJS 使用异步管道成功处理