AngularJS Example:

by Nikhil Nanjappa

HTML

<div ng-app="myApp">
  <div ng-controller="HomeCtrl">
    <table class="table">
      <thead>
        <tr>
          <th><b>User</b></th>
          <th ng-repeat="m in rowData">
            <b>{{m.column_name}}</b>
          </th>
        </tr>
      </thead>
      <tbody>
        <tr ng-repeat="user in users">
          <td>{{user}}</td>
          <td ng-repeat="row in rowData">
            <input ng-if="row.type == 'text'" type="text" />

            <input type="checkbox" ng-if="row.type == 'checkbox'" />

            <select ng-if="row.type == 'select'">
              <option ng-repeat="option in row.options" value="{{option}}">{{option}}</option>
            </select>
          </td>
        </tr>
      </tbody>
    </table>
  </div>
</div>

CSS

table {
  width: 100%;
  border-collapse: initial;
  border-spacing: 2px;
}

tr td, tr th {
  border: 1px solid black;
  text-align: center;
}

JavaScript

var myApp = angular.module('myApp', []);

myApp.controller('HomeCtrl', function ($scope) {
  $scope.users = ["Aileen Mottern", "Abraham Lincoln"];

  $scope.rowData = [{
    column_name: "Required Headset",
    options: ["one", "two", "three"],
    required: "true",
    type: "select",
    u_req_headset: ""
  }, {
    column_name: "Primary Contact Number",
    options: [],
    required: "true",
    type: "text",
    u_primary_contact_number: ""
  }];
});