ngFor Direction

  <div *ngFor="let color of colors; index as i; first as f; last as l; odd as o; even as e">
    <h2>{{i}} {{color}} {{ f }} {{ l }} {{ o }} {{ e }}</h2>
  </div>
export class TestNgforComponent implements OnInit {
  colors = ["red","blue","green","yellow"];
  constructor() { }
  ngOnInit() {
  }
}