角度响应表不适用于Internet Explorer 9(IE 9)。适用于IE 10

时间:2016-03-12 04:12:29

标签: jquery html css angularjs internet-explorer-9

我真的希望有人可以帮助我。我正在尝试使用AndréWerlang(又名awerlang)的简单但优秀的Angular responsive table plugin

它适用于IE 10 +,Chrome和Firefox。正如标题所说,它在IE 9上不起作用。这是插件的Live Demo,您可以在IE中打开(并通过调试器模拟IE 9,或者尽管如此)。

我正在使用Bootstrap的ng-repeat示例(从最后一个开始)。数据加载和所有内容,但调整堆栈表的大小不能正常工作。我尝试在'ng-app'和'ng-controller'中添加'data-'前缀,但没有变化。

Plunker Demo || JSFiddle Demo

<!DOCTYPE html>
<html data-ng-app="app">

<head>
  <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.0/angular.min.js"></script>
  <script src="https://cdn.rawgit.com/awerlang/angular-responsive-tables/master/release/angular-responsive-tables.min.js"></script>
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/css/bootstrap.min.css">
  <link rel="stylesheet" href="https://cdn.rawgit.com/awerlang/angular-responsive-tables/master/release/angular-responsive-tables.min.css">
</head>

<body data-ng-controller="TestController as ctrl">
  <table class="table table-bordered table-striped table-hover" wt-responsive-table>
    <thead>
      <tr>
        <th>Name</th>
        <th>Version</th>
        <th>Language</th>
        <th>Maintainer</th>
        <th>Stars</th>
      </tr>
    </thead>
    <tbody>
      <tr ng-repeat="item in ctrl.projects">
        <td>{{item.name}}</td>
        <td>{{item.version}}</td>
        <td>{{item.language}}</td>
        <td>{{item.maintainer}}</td>
        <td>{{item.stars}}</td>
      </tr>
    </tbody>
  </table>

  <script>
    function TestController() {
      this.projects = [
        {name: "AngularJS", version: "1.5", language: "JavaScript", maintainer: "Google", stars: 35000},
        {name: "Bootstrap", version: "3.3", language: "CSS", maintainer: "Twitter", stars: 23000}, 
        {name: "UI-Router", version: "0.13", language: "JavaScript", maintainer: "AngularUI", stars: 15000}
      ];
    }

    var app = angular.module('app', ['wt.responsive']);
    app.controller('TestController', TestController);
  </script>
</body>

</html>

它应该如何显示(IE 11)vs它如何显示(IE 9) - 抱歉大型快照。

enter image description here

enter image description here

提前致谢!

1 个答案:

答案 0 :(得分:1)

您可以尝试的一件事是将float: left;添加到表格中的每个元素。通过在页面顶部添加<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">,我在IE 9中也很幸运。 如果有效,请告诉我!