I want to count how many iterations my ng-repeat did and do something with that value on my controller.
I tried to create a scope variable and increment it on repeat but couldn't get it to work. It just prints "1" next to every dropdown ng-repeat creates.
I tried this so far;
<section class="col col-2" ng-repeat="detailField in cusDetailFields" required>
<select data-smart-select2 id="detailField-{{detailField}}" ng-model="selectedCustomerDetail[detailField]">
<option class="text-align-right"
value="">{{getFieldText(detailField)}} Seçiniz
</option>
<option class="text-align-right"
value="{{detailFieldValue.Value}}"
ng-repeat="detailFieldValue in cusDetail = (customerDetailFilters | filter : { DetailKey : detailField })">
{{detailFieldValue.Value}}
</option>
</select>
{{counter+1}}
</section>
How can I achieve this?