Angular 2 Angular - ForLoop

30% OFF - 9th Anniversary discount on Entity Framework Extensions until December 15 with code: ZZZANNIVERSARY9

Syntax

  1. < div *ngFor="let item of items; let i = index">{{i}} {{item}}</ div>

Remarks

The *ngFor structural directive runs as a loop in a collection and repeats a piece of html for each element of a collection.

@View decorator is now deprecated. Developers should be using template or 'templateUrl' properties for @Component decorator.



Got any Angular 2 Question?