通常、ng-repeatを持つテーブルでは、カラムではなくカラムを塗りつぶします。しかし、私の場合には、残念ながら、サーバーからの応答は次のようになります。テーブルのカラムをng-repeatで埋める方法
[
[{name:'John'},{name:'Sarah'},{name:'Ann'},{name:'Josh'},{name:'Mike'},{name:'Olaf'},{name:'Jane'},{name:'Rachel'},{name:'Hank'},{name:'Nick'}],
[{age:'23'},{age:'41'},{age:'23'},{age:'14'},{age:'42'},{age:'32'},{age:'12'},{age:'65'},{age:'32'},{age:'21'}],
[{sex:'female'},{sex:'female'},{sex:'female'},{sex:'male'},{sex:'male'},{sex:'male'},{sex:'female'},{sex:'female'},{sex:'male'},{sex:'male'}],
[{eyes:'brown'},{eyes:'green'},{eyes:'blue'},{eyes:'blue'},{eyes:'grey'},{eyes:'green'},{eyes:'brown'},{eyes:'brown'},{eyes:'blue'},{eyes:'brown'}],
]
しかし、私は自分の列に名前を必要とする、彼らのコラムなどで年齢と私はそれが行のセルを繰り返しNGが、繰り返し使用しようとすると、列はありません。どのようにして列を1つ1つ、名前、年齢などで埋め込むことができますか?ここで
angular.module('App', [])
.controller('Ctrl', function($scope) {
$scope.arr = [
[{name:'John'},{name:'Sarah'},{name:'Ann'},{name:'Josh'},{name:'Mike'},{name:'Olaf'},{name:'Jane'},{name:'Rachel'},{name:'Hank'},{name:'Nick'}],
[{age:'23'},{age:'41'},{age:'23'},{age:'14'},{age:'42'},{age:'32'},{age:'12'},{age:'65'},{age:'32'},{age:'21'}],
[{sex:'female'},{sex:'female'},{sex:'female'},{sex:'male'},{sex:'male'},{sex:'male'},{sex:'female'},{sex:'female'},{sex:'male'},{sex:'male'}],
[{eyes:'brown'},{eyes:'green'},{eyes:'blue'},{eyes:'blue'},{eyes:'grey'},{eyes:'green'},{eyes:'brown'},{eyes:'brown'},{eyes:'blue'},{eyes:'brown'}],
]
});
.tg {border-collapse:collapse;border-spacing:0;}
.tg td{font-family:Arial, sans-serif;font-size:14px;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;}
.tg th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;}
.tg .tg-s6z2{text-align:center}
<!DOCTYPE html>
<html ng-app="App">
<head>
<script data-require="[email protected]" data-semver="1.5.8" src="https://opensource.keycdn.com/angularjs/1.5.8/angular.min.js"></script>
<link rel="stylesheet" href="style.css" />
<script src="script.js"></script>
</head>
<body ng-controller="Ctrl">
<table class="tg">
<tr>
<th class="tg-s6z2">name</th>
<th class="tg-s6z2">age</th>
<th class="tg-s6z2">sex</th>
<th class="tg-s6z2">eyes color</th>
</tr>
<tr>
<td class="tg-s6z2"></td>
<td class="tg-s6z2"></td>
<td class="tg-s6z2"></td>
<td class="tg-s6z2"></td>
</tr>
<tr>
<td class="tg-s6z2"></td>
<td class="tg-s6z2"></td>
<td class="tg-s6z2"></td>
<td class="tg-s6z2"></td>
</tr>
<tr>
<td class="tg-s6z2"></td>
<td class="tg-s6z2"></td>
<td class="tg-s6z2"></td>
<td class="tg-s6z2"></td>
</tr>
<tr>
<td class="tg-s6z2"></td>
<td class="tg-s6z2"></td>
<td class="tg-s6z2"></td>
<td class="tg-s6z2"></td>
</tr>
<tr>
<td class="tg-s6z2"></td>
<td class="tg-s6z2"></td>
<td class="tg-s6z2"></td>
<td class="tg-s6z2"></td>
</tr>
<tr>
<td class="tg-s6z2"></td>
<td class="tg-s6z2"></td>
<td class="tg-s6z2"></td>
<td class="tg-s6z2"></td>
</tr>
<tr>
<td class="tg-s6z2"></td>
<td class="tg-s6z2"></td>
<td class="tg-s6z2"></td>
<td class="tg-s6z2"></td>
</tr>
<tr>
<td class="tg-s6z2"></td>
<td class="tg-s6z2"></td>
<td class="tg-s6z2"></td>
<td class="tg-s6z2"></td>
</tr>
<tr>
<td class="tg-s6z2"></td>
<td class="tg-s6z2"></td>
<td class="tg-s6z2"></td>
<td class="tg-s6z2"></td>
</tr>
<tr>
<td class="tg-s6z2"></td>
<td class="tg-s6z2"></td>
<td class="tg-s6z2"></td>
<td class="tg-s6z2"></td>
</tr>
</table>
</body>
</html>
、クーゼNGリピートARRの戻り配列名前の配列には.age、.sex、および.eyesはありません。 – YoroDiallo