I have the following json structure
"bonds": [
{
"name": "bond_0",
"interface": [
"nic_0",
"nic_1"
],
"mode": "active_standby",
"primary_interface": "nic_0"
},
{
"name": "bond_1",
"interface": [
"nic_0",
"nic_1"
],
"mode": "active_standby",
"primary_interface": "nic_0"
}
]
I need to loop and display the data in a table. although I can display all the values ihave trouble to display the interface array. I tried to do this with ng-repeat="interface in bond.interfaces but it is not working. your help will be appreciated at my view the code is
<table class="table">
<tr>
<th>Name</th>
<th>interface</th>
<th>mode</th>
<th>primary interface</th>
</tr>
<tr ng-repeat="bond in bonds">
<td><div>{{bond.name}}</div></td>
<td><table><tr ng-repeat="interface in bond.interfaces"><td>{{interface}}</td></tr></table></td>
<td>{{bond.mode}}</td>
<td>{{bond.primary_interface}}</td>
</tr>
</table>
s
. Also is the objectbonds
assigned directly to the scope?