Angular - Directives
What will be the output of this template?
<div *ngFor="let num of [1,2,3]; let idx = index">{{idx}}: {{num}}</div><div *ngFor="let num of [1,2,3]; let idx = index">{{idx}}: {{num}}</div>The idx variable holds the zero-based index, and num holds the current number.
Each <div> shows index and number separated by colon.
15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions