2

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
  • How have you tried it? Commented May 5, 2019 at 13:06

1 Answer 1

2

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.