【发布时间】:2017-09-09 14:24:20
【问题描述】:
我在我的 AngularJS 应用程序中使用来自 eriktufvesson 的 ngBootbox,如 BootBox.js Documentation 如何在警报中使用回调函数所述:
bootbox.alert({
message: "This is an alert with a callback!",
callback: function () {
console.log('This was logged in the callback!');
}
})
这是我的代码:
$ngBootbox.alert({
size: "small",
title: "Error",
message: message,
backdrop: true,
closeButton: false,
callback: function () {
//do something when modal closed right?
console.log('hello');
//it's not working right now!
}
});
那么,如何让 ngBootBox 提醒回调函数在 AngularJS 应用中工作?
请赐教。
*注意: 我也使用 ngBootBox 确认,它工作得很好,我只是不知道如何处理 ngBootbox 警报回调函数。
【问题讨论】:
标签: javascript angularjs bootbox