I have an array called allSquads
. It contains a series of objects which each contain a property called squad
. I want to repeat through the contents of this squad
array on every object in the allSquads
array.
If I ng-repeat through allSquads[0].squad
it works fine on that single array.
However, I want to continue repeating, like so:
allSquads[0].squad
allSquads[1].squad
allSquads[2].squad
etc.
My (incorrect) solution currently looks like this:
<div ng-repeat="player in allSquads[$index].squad">...</div>
I assumed $index in this case would represent the incrementally increasing integer, but it's not working. Can anyone help?
Thanks in advance...