<div class="scrollable-window scrollable-window-lg">
  <div ng-repeat="room in rooms track by room.id" >
    <h4>{{room.name}}</h4>
    <div class="well" ng-show="!room.activityDevices.length">No activity devices selected for this room.</div>
    <table class="table" ng-repeat="activityDevice in room.activityDevices track by activityDevice.id">
      <thead>
        <tr>
          <th>{{activityDevice.name}}</th>
          <th class="text-center">Power</th>
          <th class="text-center">Input</th>
        </tr>
      </thead>
      <tbody>
        <tr ng-repeat="device in room.devices track by device.id">
          <td>{{device.name}}</td>
          <td class="text-center">
            <!-- <label for="power{{$index}}"> -->
              <input type="checkbox" name="power"
                     checklist-model="activityDevice.activities"
                     checklist-compare-on="['device', 'type']"
                     checklist-value="{
                       'device': device.id,
                       'type': 1
                     }">
            <!--     <span></span>
            </label> -->
          </td>
          <td class="text-center">
            <!-- <label for="input{{$index}}"> -->
              <input type="checkbox" name="input"
                     checklist-model="activityDevice.activities"
                     checklist-compare-on="['device', 'type']"
                     checklist-value="{
                       'device': device.id,
                       'type': 2
                     }">
              <!-- <span></span>
            </label> -->
          </td>
        </tr>
      </tbody>
    </table>
  </div>
</div>