<div ng-repeat="device in simpleActivity.devices track by $index">
  <function-select ng-if="$index === simpleActivity.index" system-id="system.id" room="room" device="device"></function-select>
</div>


<div class="left-and-right">
  <button class="btn btn-primary" ng-click="goBack()"><i class="fa fa-caret-left"></i> Back</button>
  <button class="btn btn-primary btn-next" ng-disabled="!simpleActivity.devices[simpleActivity.index].func" ng-if="simpleActivity.index + 1 !== simpleActivity.devices.length" ng-click="incrIdx()"> Next </button>
  <button class="btn btn-primary" ng-disabled="!simpleActivity.devices[simpleActivity.index].func" ng-if="simpleActivity.index + 1 === simpleActivity.devices.length" ng-click="finish()">Finish</button>
</div>
