Within a specific section of my HTML code, I am initializing a scope variable like this:
$scope.my_data = [
{
c1: "r1c1",
c2: "r1c2",
c3: "r1c3",
c4: "r1c4",
},
{
c1: "r2c1",
c2: "r2c2",
c3: "r2c3",
c4: "r2c4",
},...
];
After that, my intention is to loop through it using ng-repeat
. Here's how I implement it:
<tbody>
<tr data-ng-repeat="row in my_data">
<tr data-ng-repeat="(column, value) in row">
<td>{$ column $}</td>
<td>{$ value $}</td>
</tr>
</tr>
</tbody>
However, I'm facing an issue where nothing appears for the column and value.
If I use (row_num, row) in my_data
, row_num correctly displays the index and row contains the correct object. Now, my goal is to expand this object further.