Stats

241 Contributors: 9 Thursday, July 20, 2017
Licensed under: CC-BY-SA
Not affiliated with Stack Overflow
Rip Tutorial: riptutorial@gmail.com
Roadmap: roadmap

Angular - ForLoop

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.

Related Examples