Looking to utilize *ngFor to iterate over my array elements multiple times. Here's what I have:
Within the component:
letters: Array<string> = [a, b, c, d, e];
currentLetter: string = c;
In the template:
<div *ngFor="let letter of letters" (click)="currentLetter = letter">{{letter}}</div>
Desired output in the render:
a, b, c, d, e
After clicking on 'a':
d, e, a, b, c
After clicking on 'e':
c, d, e, a, b
Any suggestions or tips would be greatly appreciated! Thanks in advance!