You can add a table row after the ngFor and add ngIf to check if the number of objects in the array is greater than or equal to 2 (To show the total)
Your html code will look like this:
<tr *ngFor="let object of objects">
<td> {{object.field1}} </td>
<td> {{object.field2}} </td>
<td> {{object.field3}} </td>
<td> {{object.field4}} </td>
</tr>
<tr *ngIf="showTotal()">
<td>Total</td>
<td>...</td>
<td>...</td>
<td>...</td>
<td>...</td>
</tr>
And in your .ts file:
showTotal(): boolean {
return this.objects.length >= 2;
}
The row containing the total will be created only if the number of rows in the table (which is the number of objects) is greater than or equal to 2)