我有这样的模式和范围打印范围子集合
categoria: String,
marca: String,
modelo: String,
tipo: String,
detalle: [{
codigo: String,
sn: String,
proveedor: String,
de: String,
ubicacion: String,
observacion: String,
}]
我需要在我的HTML打印这个我试过,但没有作品:
<div class="table-responsive">
<table class="table table-hover">
<thead>
<th>#</th>
<th>Codigo</th>
<th>Categoria</th>
<th>Detalles</th>
<th>Eliminar</th>
</thead>
<tbody>
<tr ng-repeat="item in stock">
<td> </td>
<td>{{item.detalle.codigo}}</td>
<td>{{item.categoria}}</td>
<td><a href="#" ng-click="detailStock(item._id)"><i class="glyphicon glyphicon-pencil"></i></a></td>
<td><a href="#" ng-click="deleteStock(item._id)"><i class="glyphicon glyphicon-trash"></i></a></td>
</tr>
</tbody>
</table>
</div>
此代码显示我的item.categoria无问题,但不要item.detalle.codigo 我怎么可以在我的桌子上打印这个?
'detalle'是一个数组;您需要遍历数组或显式访问数组中的一条记录。 – Claies