MD Ghouse MD Ghouse - 1 year ago 105
AngularJS Question

Why bootstrap modal not hiding its popup

Here i'm using Angular with Bootstrap here when i Click on * Icon or click on CLOSE button why modal not hiding

<div class="modal" id="modalSuccess">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-body">
<button class="close" data-toggle="modal" data-target="#modalSuccess">&times;</button>
<h4 style="color:green">{{msg}}</h4>
<div class="modal-footer">
<input type="button" class="btn btn-success btn-sm" value="Close" ng-click="okCloseBtn()" />


$scope.okCloseBtn = function () {
alert('in closer')

Here alert is working please give me answer where I'm doing wrong

Answer Source

You need to use $modalInstance

 $scope.okCloseBtn = function () {
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download