angular array forloop code example
Example 1: forloop angular
for (let i = 0; i < 3; i++) {
console.log ("Block statement execution no." + i);
}
Example 2: angular loop through array
$scope.content = {};
$scope.content.codehttp = [200, 200, 200, 201];
angular.forEach($scope.content.codehttp, function(value, key) {
if (value != 200) {
$scope.flag_a = 'bad';
}
})//this is awsome