Answers for "ngfor set id angular"

1

applying ids for ngfor

<li *ngFor="let episode of episodes; let i = index">
     <div id="{{ 'wave' + i }}"></div>
</li>
Posted by: Guest on May-05-2020
0

ngfor with different id

<div class = "CirclePoint" *ngFor="let c of circles" 
    [attr.id]="'Location' + c.id">
</div>

<div class = "CirclePoint" *ngFor="let c of circles" 
    attr.id="Location{{c.id}}">
</div>
Posted by: Guest on March-19-2021

Browse Popular Code Answers by Language