例如我想重複一下就是雪佛蘭modelos的。這是我的代碼在這個例子中,如何重複特定marca的模型?
<body ng-controller="marcasController">
<ul ng-repeat="marca in marcas">
<li ng-repeat="tipo in marca.modelo">{{tipo.nombre}}</li>
</ul>
</body>
var app = angular.module('App', []);
app.controller('marcasController', ['$scope', function($scope) {
$scope.marcas =[
{
"nombre": "Chevrolet",
"image": "images/aveo.jpg",
"modelo": [
{"nombre":"aveo", "color":"black"},
{"nombre":"corsa", "color":"yellow"}
],
"tab": "aveo"
},
{
"nombre": "Renault",
"image": "images/aveo.jpg",
"modelo": [
{"nombre":"clio", "color":"black"},
{"nombre":"sandero", "color":"red"}
],
"tab": "aveo"
},
];
}])
這裏http://plnkr.co/edit/JmhcU06dypoCwOzszLom?p=preview
好的,謝謝這是完美的 – Gerard 2014-11-07 21:49:59