Ich möchte eine Tabelle mit AngularJS anzeigen. Die Datenquelle für die Tabelle ist eine REST-API. Hier ist ein Beispiel Antwort:AngularJS Tabelle mit Daten aus REST API
{
"value": 43,
"C_class": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13
],
"C_name": [
"C_1",
"C_2",
"C_3",
"C_4",
"C_5",
"C_6",
"C_7",
"C_8",
"C_9",
"C_10",
"C_11",
"C_12",
"C_13"
]
}
Ich mag unter den Daten in dem Format anzuzeigen:
<tr><td> 1</td><td>C_1<td>
<td>2<td><td>C_2<td>
<td>3<td><td>C_3<td>
<td>4<td><td>C_4<td>
<td>5<td><td>C_5<td>.....
ich versucht habe, mit ng-repeat
, aber nicht in der Lage zu holen. Danke
<table class="table" border="1" style="width: 100%;" id="detail_table">
<tbody><tr ng-repeat="value in tests">
<td>{{value.C_name}}</td>
<td>{{value.C_class}}</td>
</tr></tbody></table>
gefunden Ihre Lösung @Akshaya? –
ja ich habe es ... danke – Akshaya