I am implementing ng-repeat to create elements for the boot accordion interface.
I have an ng-repeat job, but the problem is that I need to dynamically create an identifier to individually customize the accordion element.
Links to my ng-repeat HTML links:
<div class="panel-heading" data-toggle="collapse" data-parent="#products-accordion" href="#collapseOne">
And the bottom links:
<div id="collapseOne" class="panel-collapse collapse in">
For this to work correctly, collapseOne must be dynamic - collapse1, collapse2, etc. How can iterate values in ng-repeat? "collapse" + I am basically what I am trying to achieve.
Secondly, only the first element in the ng-repeat list requires the class "in" on this line:
<div id="collapseOne" class="panel-collapse collapse in">
This ensures the opening of the first element.
Thank you in advance for your help.
source
share