I Have an Array that each member of it is, an array of objects. More detail: Picture
I want to use objects in ng-repeater. How do I do this?!
1 Answer
You can use nested ng-repeat for this.
$scope.storeCar = [
[ {name: 'abc'}, {name: 'def'} ],
[ {name: 'ghi'}]
];
And iterate over storeCar like this:
<ul>
<li ng-repeat="cars in storeCar">
<ul>
<li ng-repeat="car in cars">
{{car.name}}
</li>
</ul>
</li>
</ul>
9 Comments
kTT
@HosseinGanjyar so if it doesn't work, could you insert source code of your storeCar object?
kTT
@HosseinGanjyar please insert sample of your structure in above jsfiddle and send link upgraded version
my datat is in Link . An array with arrays of objects. I want to show object in a repeater. thanks
kTT
@HosseinGanjyar so it's the same with the one I provided above... check my jsfiddle or insert real json data of your object, a code not a picture
|