Q:

angular loop through array

let array = [1,2,3];
for (let i = 0; i < array.length; i++) {
  console.log(array[i]);
}
0
$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
0

New to Communities?

Join the community