Angular 2 Angular - ForLoop


  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.