這是我的HTML code:
<thead>
<tr>
<td class="nameCell"></td>
<td colspan="31" class="alignCenter underlineText captionCell">EMSTF Resident Support & Computer Operation Support Services Team Roster</td>
..........................
</tr>
<tr #rosterMonthRow>
<td class="nameCell"></td>
<td class="alignCenter selectRosterMonthCell clickable underlineText" colspan="31">
<span (click)="prevMonth()"><</span>
{{ (monthlyCalendar)?.monthName }}
<span (click)="nextMonth()">></span>
</td>
<td colspan="10"></td>
</tr>
<tr #holidayRow>
<td class="nameCell borderCell">Holiday</td>
<td *ngFor="let dateObj of (monthlyCalendar)?.dateObjList|toArray" class="borderCell alignCenter dateCell phCell" >
<span *ngIf=dateObj.isPublicHoliday>PH</span>
</td>
<td colspan="10"></td>
</tr>
以上的code 已經working properly, 問題是monthlyCalendar.dateObjList 這個array 長短不一樣,
所以和上邊那兩個row 的長度不一樣,我想做的事如果monthlyCalendar.dateObjList 這個array 的長度不等於31 時,就output多幾個cell, 使它和上邊那兩個row 的長度一樣, 請問如何解決呢?