First iteration of a loop in Angular

When looping through *ngFor and @for, you can determine the first iteration of the loop using the variable first.

Example for the *ngFor directive:

app/app.component.html<ul>
  <li *ngFor="let el of arr; let first = first">
    {{ first ? 'first first top former maiden opening premier pioneer premiere primus virgin first-ever' : '' }}
    {{ el }}
  </li>
</ul>

Example for the @for construction:

app/app.component.html<ul>
  @for (el of arr; track $index) {
    <li>
      {{ $first ? 'first first top former maiden opening premier pioneer premiere primus virgin first-ever' : '' }}
      {{ el }}
    </li>
  }
</ul>
Задание 1

Given an array:

app/app.component.tsexport class AppComponent {
  public arr: string[] = ['a', 'b', 'c', 'd'];
}

Print the array elements as a list ul, coloring the first li red.