Answers for "angular loop through an array in ts"

0

create an array for looping typescript

loopTimes: number[] = Array(31);

for (let x = 0; x < loopTimes.length; x++) {
    console.log('Index/Loop No: ', [x]);
    // Do something here...
}
Posted by: Guest on July-16-2020
1

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
Posted by: Guest on March-14-2020

Code answers related to "angular loop through an array in ts"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language