What is the purpose of ngFor directive?

We use Angular ngFor directive in the template to display each item in the list. For example, here we iterate over list of users,

<li *ngFor="let user of users">{{ user }}</li>

The user variable in the ngFor double-quoted instruction is a template input variable


Author of content
Edit this page

Made by Michael Sakhniuk

Twitter