Answers for "how to use an index on a for loop in angular"

0

ngfor index

<ul>
    <li *ngFor="let item of items; let i = index" [attr.data-index]="i">
        {{item}}
        {{i}}
    </li>
</ul>
Posted by: Guest on August-24-2020

Code answers related to "how to use an index on a for loop in angular"

Browse Popular Code Answers by Language