Mixing a Table with Angular-UI Accordion

前端 未结 2 1736
梦谈多话
梦谈多话 2021-01-05 07:49

I\'m trying to mix a table with angular-ui\'s accordion but I can\'t figure out a way to do it. I\'m not a pro, writing directives. I wonder if such a bridge exist. To achie

相关标签:
2条回答
  • 2021-01-05 08:25

    In my case I made it a bit primitive but maybe that would be a good solution for you as well. Look:

     <tbody ng-repeat="person in people | orderBy:predicate:reverse"  >
      <tr ng-click="isOpen=!isOpen">
        <td>{{person.name}}</td>
        <td>{{person.job}}</td>
        <td>{{person.age}}</td>
        <td>{{person.grade}}</td>
      </tr>
      <tr ng-if="isOpen">
      <td>Just an empty line</td>
      </tr>
      </tbody>
    
    0 讨论(0)
  • 2021-01-05 08:31

    1) You can try div instead of table for main accordion. It works for me.

    2) And here is the accordion table example done in JSFiddle below, i hope it will help you. http://jsfiddle.net/Pixic/VGgbq/

    0 讨论(0)
提交回复
热议问题