angular.forEach(myArray, function(arrayElement) {
$log.info(arrayElement);
});
angular.forEach(myArray, function(arrayElement) {
$log.info(arrayElement);
});
var values = {name: 'misko', gender: 'male'};
var log = [];
angular.forEach(values, function(value, key) {
this.push(key + ': ' + value);
}, log);
expect(log).toEqual(['name: misko', 'gender: male']);
angular.forEach(myArray, function(arrayElement) {
//Your code
});
<p *ngFor="let name of names">{{name}}</p>