オブジェクトの配列があります。正しい列にデータを挿入するng-repeatを使用してテーブルを作成します。AngularJS ng-repeatを使用した垂直テーブル
今の私はこのようにしており、正しい方法ではできません。
<div class container>
<div class="row">
<div class="col-md-12">
<table border='0' cellpadding='0' cellspacing='0'>
<tr>
<th>Time()</th>
<th>Room - One</th>
<th>Room - Two</th>
<th>Room - Three</th>
<th>Room - Four</th>
</tr>
<tr ng-repeat="company in dataOne track by $index">
<td>{{company.start}} - {{company.end}}</td>
<td>{{company.company}}</td>
<td>{{company.company}}</td>
<td>{{company.company}}</td>
<td>{{company.company}}</td>
</tr>
</table>
</div>
</div>
</div>
サンプルデータ
$scope.dataOne = [{
"start": "7:30",
"end": "8:00",
"company": "Sony"
}, {
"start": "7:30",
"end": "8:00",
"company": "LG"
}, {
"start": "7:30",
"end": "8:00",
"company": "UPS"
}, {
"start": "7:30",
"end": "8:00",
"company": "MSI"
}, {
"start": "8:00",
"end": "8:30",
"company": "Samsung"
}, {
"start": "8:00",
"end": "8:30",
"company": "Tesco"
}, {
"start": "8:00",
"end": "8:30",
"company": "VW"
}, {
"start": "8:00",
"end": "8:30",
"company": "Audi"
}, {
"start": "9:00",
"end": "9:30",
"company": "BMW"
}, {
"start": "9:00",
"end": "9:30",
"company": "Sunoco"
}, {
"start": "9:00",
"end": "9:30",
"company": "Blizzard"
}, {
"start": "9:00",
"end": "9:30",
"company": "CS"
}, {
"start": "9:30",
"end": "10:00",
"company": "Mazda"
}, {
"start": "9:30",
"end": "10:00",
"company": "Nissan"
}, {
"start": "9:30",
"end": "10:00",
"company": "Porsche"
}, {
"start": "9:30",
"end": "10:00",
"company": "Hyundai"
}]
console.log($scope.dataOne)
あなたの '$ scope.dataOne'はどのようなものが見えますか? – Ryan27
サンプルデータはプランカに含まれています –
データ配列が長すぎない場合、ネストされた 'ng-repeat'を使用できます –