I have in Angular 7 the following:
<th *ngFor="let day of weekDays"><div>{{day}}</div></th>
but want to set the <th id="today"
for the single element among all weekDays
that corresponds/equals to today
.
Given that:
this.today = "Fri 5/7";
The result should be:
<th id="today"><div>Fri 5/7</div></th>
<th><div>Sat 6/7</div></th>
<th><div>Sun 7/7</div></th>
<th><div>Mon 8/7</div></th>
<th><div>Tue 9/7</div></th>
<th><div>Wed 10/7</div></th>
<th><div>Thu 11/7</div></th>
How do I do that?