0

I am trying to use an ng-repeat inside a Semantic UI accordion. However, once I included ng-repeat inside the div tag with the accordion class, the accordion doesn't open nor close anymore. Clicking it doesn't do anything.

The accordion works properly here:

<div class="ui styled accordion">
    <div class="title"> 
        <i class="dropdown icon"></i> Filename 
    </div>
    <div class="content">
        <a>File Link</a>
    </div>
</div>

The accordion breaks once I include ng-repeat:

<div ng-repeat="file in files" class="ui styled accordion">
    <div class="title"> 
        <i class="dropdown icon"></i> Filename 
    </div>
    <div class="content">
        <a>File Link</a>
    </div>
</div>

I need to include the ng-repeat inside the accordion, and I need the accordion to do what it's supposed to do. Any help will be very much appreciated. Thank you!

2
  • Have you tried <div class="ui styled accordion"><div ng-repeat="file in files" ><div class="title"> Aug 18, 2017 at 17:28
  • 1
    ooh, that did the trick. Thank you! @JonathanAnctil
    – limciana
    Aug 18, 2017 at 17:32

1 Answer 1

1
<div class="ui styled accordion">
    <div ng-repeat="file in files">
        <div class="title"> 
        ...  

ng-repeat and semantic ui needs to be separated

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.