1<ul>
2 <li *ngFor="let item of items; let i = index" [attr.data-index]="i">
3 {{item}}
4 </li>
5</ul>
1var values = {name: 'misko', gender: 'male'};
2var log = [];
3angular.forEach(values, function(value, key) {
4 this.push(key + ': ' + value);
5}, log);
6expect(log).toEqual(['name: misko', 'gender: male']);