0

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.

1
Contributor
1
Reply
8
Views
4 Months
Discussion Span
Last Post by solomon_13000
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.