Angular - ForLoop

Download angular2 eBook


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


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.

Related Examples


241 Contributors: 9
Thursday, July 20, 2017
Licensed under: CC-BY-SA

Not affiliated with Stack Overflow
Rip Tutorial:

Download eBook