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


<div class="left-and-right">
  <button class="btn btn-primary btn-previous" ng-click="goBack()">Back</button>
  <button class="btn btn-primary btn-next"  ng-click="doNext()">Next</button>
</div>
