I want to display a table with header values inside ng-repeat. The code I have at present is as follows

```
<table>
                        <div class="panel-body">
                        <div class="modal-body">
                              <table class="table">

                                <tr>
                                    <td>Leave Application Date</td>
                                    <td>Date from:</td>
                                    <td>Date To:</td>
                                    <td>Status</td>
                                    <td>Employee Name</td>
                                </tr>
                                <tr ng-repeat="leaveApp in leaveApplicationCollection" class="row">

                                    <td>
                                        <table>
                                            <tr>
                                                <td >{{leaveApp.leaveApplicationDate}}</td>
                                                <td >{{leaveApp.dateFrom}}</td>
                                                <td >{{leaveApp.dateTo}}</td>
                                                <td >{{leaveApp.status}}</td>
                                                <td >{{leaveApp.employee.fullName}}</td>
                                                <td><a ng-click="showLeaveDetails(leaveApp.id)"><span><i class='icon-search3 pull-left'></i></span></a>
                                                <a ng-click="showLeaveCancelModal(leaveApp.id)"><i class='icon-cancel-circle'></i></a>
                                                </td>

                                            </tr>
                                            <tr>
                                                <td ng-show=isIdActive(leaveApp.id)>Leave App details</td>
                                            </tr>
                                        </table>
                                    </td>
                                    </div>

        </tr>

    </table>

```

The problem is that it shows the entire second table under the first heading and the other headings contain no data.

I was wondering if it would be possible to use $first to set the headings.

Please suggest a solution.

PS:I have a constraint.

I have to have the second table inside a td. This is because I need to show an element let's say 'Leave Application Details' appear right below the row when the leave application row is clicked. This is my constraint.