一旦引导模式关闭,视图页面将被禁用。(AngularJS)

一旦引导模式关闭,视图页面将被禁用。(AngularJS),angularjs,twitter-bootstrap,bootstrap-modal,Angularjs,Twitter Bootstrap,Bootstrap Modal,我有一个用户表。当我点击一个用户名时,它必须显示一个引导模式。但是一旦我关闭模式,表格页面就被锁定,我无法点击任何其他用户名。页面已锁定 代码应该是这样的 <!DOCTYPE html> <html> <head> <title>TAble</title> <style> table, th{ border: 1px solid Green;border-collapse : collapse; margin

我有一个用户表。当我点击一个用户名时,它必须显示一个引导模式。但是一旦我关闭模式,表格页面就被锁定,我无法点击任何其他用户名。页面已锁定

代码应该是这样的

<!DOCTYPE html>
<html>
<head>
<title>TAble</title>
<style>
table, th{
    border: 1px solid Green;border-collapse : collapse;
    margin:25px;
    text-align:center;
}
td {
    border: 1px solid Green;
}
th{
    padding: 5px;
    Font-size:110%;
}
</style>

</head>

<body ng-app="myApp">
<script src="1.4.8/angular.js"></script>


<script src="angular-ui-router.js"></script>


<script src="angular-animate.js"></script>
<script src="ui-bootstrap-tpls-1.3.3.js"></script>
    <script src="ng-table.js"></script>

<link rel="stylesheet" href="ng-table.min.css">

<link rel="stylesheet" href="bootstrap.min.css">
<link rel="stylesheet" href="style.css">

<body ng-app="myApp">
<div ng-controller="tableController">
{{test}}
<table ng-table="usersTable" style="width:85%" class="table table-striped">
   <tr ng-repeat="x in data" >
       <td data-title="'Id'" filter="{ Id: 'number'}">
           <a ng-click='open(x)'>{{x.id}}</a>
       </td>
       <td data-title="'First Name'">
           {{x.first_name}}
       </td>
       <td data-title="'Last Name'">
           {{x.last_name}}
       </td>    
       <td data-title="'e-mail'" >
           {{x.email}}
       </td>    
       <td data-title="'Country'">
           {{x.country}}
       </td>    
       <td data-title="'IP'" >
           {{x.ip_address}}
       </td>    
   </tr>
</table>
</div>



</body>

<script>
var app = angular.module('myApp',['ngTable','ui.router','ngAnimate', 'ui.bootstrap']);

app.controller('tableController',function($scope,$uibModal,$filter,ngTableParams)
{
   $scope.customers = [{"id":1,"first_name":"Philip","last_name":"Kim","email":"pkim0@mediafire.com","country":"Indonesia","ip_address":"29.107.35.8"},
                        {"id":2,"first_name":"Judith","last_name":"Austin","email":"jaustin1@mapquest.com","country":"China","ip_address":"173.65.94.30"},
                        {"id":3,"first_name":"Julie","last_name":"Wells","email":"jwells2@illinois.edu","country":"Finland","ip_address":"9.100.80.145"},
                        {"id":4,"first_name":"Gloria","last_name":"Greene","email":"ggreene3@blogs.com","country":"Indonesia","ip_address":"69.115.85.157"},
                        {"id":50,"first_name":"Andrea","last_name":"Greene","email":"agreene4@fda.gov","country":"Russia","ip_address":"128.72.13.52"}];

$scope.usersTable = new ngTableParams({ },
                {                
                    getData: function ($defer, params) {
                    count:[], 
                 $scope.data = params.filter() ? $filter('filter')($scope.customers, params.filter()) : $scope.data;
                    $defer.resolve($scope.data);
                }
            }); 


$scope.localID=0;
$scope.count=2;

$scope.open = function(w) {

    var modalInstance = $uibModal.open({
      animation: true,
      template: '<h1>Hello</h1>',
      controller: 'ModalInstanceCtrl',
      backdrop:false,
      keyboard:true,
      size:'Lg',
      resolve: {
        customers: function () {
          return w;
        }
      }
    });

    modalInstance.result.then(function (selectedItem) {
      $scope.selected = selectedItem;
    });
  };

});
app.controller('ModalInstanceCtrl', function ($scope, $uibModalInstance,customers) {

  $scope.data = customers;

  $scope.cancel = function () {
    $uibModalInstance.dismiss('cancel');
  };
    });
</script>

</html>

桌子
表,th{
边框:1px纯绿色;边框折叠:折叠;
利润率:25px;
文本对齐:居中;
}
运输署{
边框:1px纯绿色;
}
th{
填充物:5px;
字体大小:110%;
}
{{test}}
{{x.id}
{{x.名字}
{{x.last_name}
{{x.email}
{{x.country}
{x.ip_地址}
var app=angular.module('myApp'、['ngTable'、'ui.router'、'ngAnimate'、'ui.bootstrap']);
app.controller('tableController',function($scope、$uibModal、$filter、ngTableParams)
{
$scope.customers=[{“id”:1,“名字”:“Philip”,“姓氏”:“Kim”,“电子邮件”:pkim0@mediafire.com“,“国家”:“印度尼西亚”,“ip地址”:“29.107.35.8”},
{“id”:2,“名字”:“朱迪思”,“姓氏”:“奥斯汀”,“电子邮件”:jaustin1@mapquest.com“,”国家“:”中国“,”ip地址“:”173.65.94.30”,
{“id”:3,“名字”:“朱莉”,“姓氏”:“威尔斯”,“电子邮件”:jwells2@illinois.edu“,“国家”:“芬兰”,“ip地址”:“9.100.80.145”},
{“id”:4,“名字”:“Gloria”,“姓氏”:“Greene”,“email”:ggreene3@blogs.com“,“国家”:“印度尼西亚”,“ip地址”:“69.115.85.157”},
{“id”:50,“名字”:“安德里亚”,“姓氏”:“格林”,“电子邮件”:agreene4@fda.gov“,”国家“:”俄罗斯“,”ip_地址“:”128.72.13.52“}];
$scope.usersTable=新的ngTableParams({},
{                
getData:函数($defer,params){
计数:[],
$scope.data=params.filter()?$filter('filter')($scope.customers,params.filter()):$scope.data;
$defer.resolve($scope.data);
}
}); 
$scope.localID=0;
$scope.count=2;
$scope.open=函数(w){
var modalInstance=$uibModal.open({
动画:没错,
模板:“你好”,
控制器:“ModalInstanceCtrl”,
背景:错,
键盘:没错,
尺寸:'Lg',
决心:{
客户:功能(){
返回w;
}
}
});
modalInstance.result.then(函数(selectedItem){
$scope.selected=selectedItem;
});
};
});
应用程序控制器('ModalInstanceCtrl',函数($scope,$uibModalInstance,customers){
$scope.data=客户;
$scope.cancel=函数(){
$uibModalInstance.discover('cancel');
};
});

找到了解决方案。我使用的是angularjs1.4.8,所以出现了这个问题!我试着使用AngularJS 1.5.3,它工作正常

你能在这里分享你的代码吗?是的!它是共享的!谢谢你们!找到了解决办法。我使用的是angularjs1.4.8,所以出现了这个问题!我试着使用AngularJS 1.5.3,它工作正常!