syntax for ngfor

49

syntax for ngfor -

<ul>
    <li *ngFor="let item of items; let i = index" [attr.data-index]="i">
        {{item}}
    </li>
</ul>

ngfor -

      <li *ngFor="let item of items; index as i; trackBy: trackByFn">...</li>
    

Comments

Submit
0 Comments