Adding List of current used devices.

This commit is contained in:
Gunther Brunner
2014-04-08 15:56:36 +09:00
parent b343f08173
commit 0bce25cabf
5 changed files with 124 additions and 60 deletions

View File

@@ -1,4 +1,24 @@
//module.exports = function DeviceControlCtrl(
module.exports = function DeviceControlCtrl($scope, DeviceService, GroupService, $location) {
$scope.groupTracker = DeviceService.trackGroup($scope)
$scope.groupDevices = $scope.groupTracker.devices
$scope.kickDevice = function (device) {
// if current device
// no more: go to devices
// more: go to first
return GroupService.kick(device).then(function () {
$scope.$digest()
})
}
$scope.controlDevice = function (device) {
$location.path('/control/' + device.serial)
}
}
// $scope
//, $routeParams
//, $location