voidfn = () => {
bootbox.confirm("Are you sure you want to continue", function (result, apiService) {
if (result == true) {
let response = this.apiService.getVoid(systemId, orderId).subscribe(
success => {
this.spinner = false;
this.toastr.success("Success");
}, error => {
this.spinner = false;
}
);
}
});
}
在此代码中,由于getVoid()
在调用apiservice
中不可用,因此无法访问bootbox
方法。
有没有办法做到这一点。请提示。
答案 0 :(得分:0)
嗨,我已经解决了上述箭头功能的问题
voidfn = () => {
bootbox.confirm("Are you sure you want to continue", (result)=> {
if (result == true) {
let response = this.apiService.getVoid(systemId, orderId).subscribe(
success => {
this.spinner = false;
this.toastr.success("Success");
}, error => {
this.spinner = false;
}
);
}
});