Catch event of backdrop click on AngularJS modal window
I create a modal window
var modalInstance = $modal.open({
templateUrl: 'template.html',
controller: app.controller,
backdrop: 'static',
resolve: {
scope: function () {
return $scope;
}
}
});
modalInstance.result.then(function (result) {
alert("Success");
}, function () {
});
But when I click over the opened modal window, it closes. I want to catch event, when user clicked over the modal window. My modal controller:
app.controller = function(){}
and modal view:
<div class="modal">
<div class="modal-dialog">
<div class="modal-content">
Hello
</div></div></div>
查看有关ng鼠标事件的文档,我认为这是您寻找https://docs.angularjs.org/api/ng/directive/ngMouseup的原因。
链接地址: http://www.djcxy.com/p/83988.html