javascript - Enumerating data-targets in ng-repeat -
I have an account in HTML which is dynamically populated like this -
& Lt; Div class = "accordion" & gt; & Lt; Div class = "accordion-panel" & gt; & Lt; Div class = "accordion-heading"> a data-target = "# fall" data-toggle = "fall" & gt; {{xheadhead}} & lt; / a & gt; & lt; / div & Lt; div id = "collapse" class = "adrenal body" & gt; .... The problem is that Data-Target
remains constant. That's why all the open / close buttons only open one piece! The goal is based on / id
s $ index
, but I do not know how to do it.
Is there a way to calculate the properties in the method? Can I use another solution?
Simply replace data-target
with the body's {{$ index}} and id
'code with the code #collepse - {code} > 'Fall - {{$ index}}'
Hope this can be helpful for you !!
Comments
Post a Comment