この質問は重複している可能性がありますが、私の要件に対する解決策はありませんでした。スクロール可能な div 要素内のテーブルの固定/固定ヘッダーといくつかの最初の列を使用するには、助けが必要です。i 個の列と行がデータ ソースに応じて増減する可能性があるため、データは動的です。現在、行数は最大 86 行、列数は最大 55 です。列幅はデータに基づいて動的です。
私のHTMLコードは以下のようになります。
<html>
<body ng-app="myapp" ng-controller="mycontroller">
<table style="width:100%; height:90%">
<tr>
<td width=3%> </td>
<td>
<table style="width:100%;">
<tr>
<td>Page header</td>
</tr>
<tr><td></td></tr>
</table>
<table style="width:100%; height:90%">
<tr>
<td>
<div ng-style="{'width': twidth + 'px', 'heigth':theight + 'px','overflow-x': 'auto','overflow-y': 'auto'}">
<table>
<thead ng-repeat="h in dummy| limitTo:1">
<tr>
<th ng-repeat="(key, val) in h">
{{key}}
</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="h in dummy">
<td ng-repeat="(key, val) in h">{{val}}</td>
</tr>
</tbody>
</table>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>