自举模态。关闭模式时屏幕变灰

时间:2018-07-13 21:54:27

标签: angularjs modal-dialog bootstrap-modal

嘿,我正在尝试使用modal: https://www.w3schools.com/bootstrap/bootstrap_modal.asp

但是,当我按下删除按钮时,屏幕变灰,并且我无法单击任何东西。有什么建议吗?

<button class="btn btn-primary" ui-sref="nextsidoradmin" 
 ng-click="SendSidor(worker.id)">CreateShift</button>
 <div class="modal fade" id="mymodal">
 <div class="modal-dialog">
 <div class="modal-content">
 <div class="modal-header">
 <h3><span style="color:red;">{{worker.name}</span>:Deleteworker</h3>
<div class="modal-body">
<button class="btn btn-primary" ng-click="RemoveWorker(worker.id)" data-dismiss="modal">Delete</button>
<button class="btn btn-primary" data-dismiss="modal" ui-sref="workers" >Cancel</button>
</div></div></div></div></div>

$scope.RemoveWorker=function(workerid){
    $http.delete("/ShiftWeb/rest/admin/removeworker?id="+workerid)
            .then(function(response){$scope.removeworker=response.data;
            $state.go($state.current, {}, {reload: true});
            $('#mymodal').modal('hide');
            console.log(response.data);
            }, function(error) {
                alert(error.data);
            }
            );
};

https://prnt.sc/k67ypc

https://prnt.sc/k67yrw

,我认为它与state.reload有关。有谁知道? 有什么建议吗?

0 个答案:

没有答案