I have an array with appointment data like this which I want to make tables from:
[
{
day: '20/10/2020',
subject: 'meeting',
client: 'Rob'
location: 'Office
},
{
day: '21/10/2020',
subject: 'meeting',
client: 'Lisa'
location: 'Town'
},
{
day: '21/10/2020',
subject: 'meeting',
client: 'Kevin'
location: 'Office
},
{
day: '22/10/2020',
subject: 'meeting',
client: 'Kevin'
location: 'Home'
}
]
my html file:
<div *ngFor="let appointment of appointments" class="card-body">
<table class="table table-striped">
<thead>
<tr>
<th> Day </th>
<th>Where </th>
<th> Client</th>
<th>Subject</th>
</tr>
</thead>
<tfoot>
<tr>
<td> <small>{{appointment.day}}</small></td>
<td> <small>{{appointment.location}} </small> </td>
<td><small>{{appointment.client}}</small> </td>
<td><small>{{appointment.subject}} </small></td>
</tfoot>
</table>
</div>
This produces a table per appointment, but how can I make it such that the appointments on the same day appear below eachother, without theader inbetween. So like this: (visualisation)
any help is appreciated
