
    <nz-table #colSpanTable [nzData]="listOfData" nzBordered>
      <thead>
        <tr>
          <th>Name</th>
          <th>Age</th>
          <th colspan="2">Home phone</th>
          <th>Address</th>
        </tr>
      </thead>
      <tbody>
        @for (data of colSpanTable.data; track data; let i = $index) {
          <tr>
            <td>{{ data.name }}</td>
            @switch (i) {
              @case (2) {
                <td>{{ data.age }}</td>
                <td rowspan="2">{{ data.tel }}</td>
                <td>{{ data.phone }}</td>
                <td>{{ data.address }}</td>
              }
              @case (3) {
                <td>{{ data.age }}</td>
                <td>{{ data.phone }}</td>
                <td>{{ data.address }}</td>
              }
              @case (4) {
                <td colspan="5">{{ data.age }}</td>
              }
              @default {
                <td>{{ data.age }}</td>
                <td>{{ data.tel }}</td>
                <td>{{ data.phone }}</td>
                <td>{{ data.address }}</td>
              }
            }
          </tr>
        }
      </tbody>
    </nz-table>
  