Answers for "how to use foreach loop in angular 8"

7

angular foreach

<ul>
    <li *ngFor="let item of items; let i = index" [attr.data-index]="i">
        {{item}}
    </li>
</ul>
Posted by: Guest on February-26-2020
-1

angular for each

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']);
Posted by: Guest on January-20-2021

Code answers related to "how to use foreach loop in angular 8"

Browse Popular Code Answers by Language