将表与Angular-UI手风琴混合

Rom*_*ain 7 css3 angularjs angular-ui-bootstrap

我正在尝试将一张桌子与angular-ui的手风琴混合在一起,但我无法想出办法.我不是专业人士,写指令.我想知道这座桥是否存在.要实现这样的目标:

<table class="table table-hover table-condensed" thead>
    <thead>
        <tr>
            <th>{{ data.profile.firstname }}</th>
            <th>{{ data.profile.lastname }}</th>
            <th>{{ data.profile.email }}</th>
            <th>{{ data.profile.company_name }}</th>
            <th>{{ data.profile.city }}</th>
        </tr>
    </thead>
    <tbody accordion close-others="true">
        <!-- <tr ng-repeat="client in clients" ng-click="goTo('profile/' + client.username);"> -->
        <tr ng-repeat="client in clients" accordion-group is-open="client.isOpen">
            <accordion-heading>
                <td>{{ client.firstname }}</td>
                <td>{{ client.lastname }}</td>
                <td>{{ client.email }}</td>
                <td>{{ client.company_name }}</td>
                <td>{{ client.city }}</td>
            </accordion-heading>
            Accordion Content
        </tr>
    </tbody>
</table>
Run Code Online (Sandbox Code Playgroud)

虽然它不起作用:(是否有人成功实现了这样的目标?

我正在寻找的结果是,当我点击表格中的一行时,它会产生与手风琴相同的行为.

小智 9

在我的情况下,我使它有点原始,但也许这对你来说也是一个很好的解决方案.看:

 <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>
Run Code Online (Sandbox Code Playgroud)