How can I write the following more succinctly?
<table class="table">
<thead>
<tr *ngFor='let entry of m_myArray; let i = index'>
<td *ngIf="i == m_myArray.length - 1"><a href=”” (click)="$event.preventDefault();OnShowRecentRecord()">{{getDateFormat(entry.date)}}</a></td>
<td *ngIf="i != m_myArray.length - 1"{{getDateFormat(entry.date)}}</td>
</tr>
</thead>
</table>
If i == m_myArray.length - 1
I want the table entry to be a link, otherwise just text. I have used a test on i
against m_myArray.length
twice and feel like I should be able to use ngElse
(or similar) to avoid that.