There are 2 loops in our code structure. They look like this:
<ion-list>
<ion-item ng-repeat="pair in items">
<div class="row">
<ion-item ng-repeat="item in pair" class="col-45">
{{item}}
</ion-item>
</div>
</ion-item>
</ion-list>
I am looking to add an element between items in the second loop, specifically with a class of col-10
. What would be the optimal approach to achieve this?
Is there a way to modify ng-repeat to include a custom element between iterations? Or perhaps replace it with a traditional for loop?
The desired final layout is as follows:
<div class="row">
<div class="col-45"></div>
<div class="col-10"></div>
<div class="col-45"></div>
</div>
UPD: The controller sends an array called pair containing [1,2]. The expected result should be:
<div class="row">
<div class="col-45">1</div>
<div class="col-10"></div>
<div class="col-45">2</div>
</div>