<div ng-repeat="device in powerOff.devices track by $index">
  <function-select ng-if="$index === powerOff.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="!powerOff.devices[powerOff.index].func" ng-if="powerOff.index + 1 !== powerOff.devices.length" ng-click="incrIdx()"> Next</button>
  <button class="btn btn-primary" ng-disabled="!powerOff.devices[powerOff.index].func" ng-if="powerOff.index + 1 === powerOff.devices.length" ng-click="finish()">Finish</button>
</div>
