我正在使用模块化窗口Angular。为了更改我表中的数据。在关闭数据的事件中我该怎么办?如果发生错失事件,那么数据以及现在的数据都会在表中传输?这是我的代码:

父母

modalRef.result.then((data) => {
    this.gridOptions.api.refreshView();
});


}

弹出

saveEntity(): void {
    if (this.RoleId.WorkedYears <= 0) {
        this.toastr.error('Please enter positive number');
    }
    else {
        this.RoleId.WorkedYears = this.RoleId.WorkedYears
        this.activeModal.close();
    }
}

close(): void {
    this.activeModal.dismiss();
}

最佳答案

使用两种方式绑定或使用LocalStorage。

09-25 16:27
查看更多