The code below opens a modal window successfully. When I attempt to open the modal window after closing it, my browser window freezes. To unfreeze I press the escape button on my keyboard.
Employee.php
<div class="modal-footer"> <button type="button" class="btn btn-secondary" ng-click="closeEmployee()" data-dismiss="modal">Close</button> </div>
EmployeeModalController.js
<div class="modal-footer"> <button type="button" class="btn btn-secondary" ng-click="closeEmployee()" data-dismiss="modal">Close</button> </div>
EmployeeModalController.js
scope.closeEmployee = function(){
scope.$dismiss('cancel');
}
EmployeeMainController.js
scope.viewEmployee = function(val){
scope.theModal = $uibModal.open({
animation: false,
scope: scope,
templateUrl: '../assets/templates/modal/Employee.php',
controller: 'EmployeeModalController',
size: '',
backdrop: 'static',
resolve: { empId: function () { return val; } }
}).result.catch(function(res) {
if (!(res === 'cancel' || res === 'escape key press')) {
throw res;
}
});
}
Your help is kindly appreciated.
Thank You.