seantrant
3/20/2017 - 9:47 AM

For each loop in template

For each loop

<div *ngFor="let user of users">
  <p>{{ user.id }}{{ user.name }}</p>
</div>
      
will loop through an array of users:
      
users = [
  {   id : 1,   name : 'Sean'  },
  {   id : 2,   name : 'Joe'  },
  {   id : 3,   name : 'Nick'  },
]