I have an angular page that returns the following data through an Array

["BO01", "BO03", "BO04", "C.A.1.", "C.F.1.", "C.F.4.", "C.L.1.", "C.M.4.", "C.R.1.", "C.R.3.",…]

What I am trying to do is, display, these Array values in an HTML column

<tr>
    <th class="tg-0lax">BO01</th>
    <th class="tg-0lax">BO03</th>
    <th class="tg-0lax">BO04</th>
  </tr>

1 Answers

2
NTP On Best Solutions

You can use ng-repeat to iterate through your array and display columns

js

$scope.columns = ["BO01", "BO03", "BO04", "C.A.1.", "C.F.1.", "C.F.4.", "C.L.1.", "C.M.4.", "C.R.1.", "C.R.3."];

html

<tr>
    <th class="tg-0lax" ng-repeat="col in columns">{{col}}</th>
</tr>

Demo