我使用角带和模态服务.我在使用参数onHide关闭模态时尝试调用函数.
var _modal = $modal({
templateUrl: "app/pages/fee/modals/historic/fee.historic.html",
controller: "HistoricController",
controllerAs: "vm",
keyboard: true,
show: false,
onHide: function() {
console.log("Close !");
},
onShow: function() {
console.log("Open !");
}
});
_modal.$promise.then(_modal.show);
Run Code Online (Sandbox Code Playgroud)
但当我关闭我的模态时没有任何反应,我在控制台中看不到任何日志(关闭或打开).提前感谢任何能够给我一些想法的人!