I am using normal modal box in angularjs. I mean model box opening code is
我在angularjs中使用普通的模态框。我的意思是模型框打开代码是
<i class="glyphicon glyphicon-edit" data-toggle="modal"
data-target="#myModal" ng-click="getsingledataForUpdate(row.id)"></i>
Now what I want is I want to add a modal close event like this
现在我想要的是我想添加像这样的模态关闭事件
$( '#myModal' )
.on('hide', function() {
console.log('hide');
})
.on('hidden', function(){
console.log('hidden');
})
.on('show', function() {
console.log('show');
})
.on('shown', function(){
console.log('shown' )
});
Is there any way to implement this?
有没有办法实现这个?
1 个解决方案
#1
0
$(function () {
$('#myModal').modal('toggle');
});
//html
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
Best you can use angular bootstrap modal.. Angular UI
最好你可以使用角度bootstrap模态..角度UI
#1
0
$(function () {
$('#myModal').modal('toggle');
});
//html
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
Best you can use angular bootstrap modal.. Angular UI
最好你可以使用角度bootstrap模态..角度UI