mirror of
https://github.com/openstf/stf
synced 2025-10-05 10:39:25 +02:00
21 lines
559 B
JavaScript
21 lines
559 B
JavaScript
define(['./_module'], function(app) {
|
|
function DeviceControlCtrl($scope, $routeParams, deviceService, controlService) {
|
|
$scope.device = null
|
|
$scope.control = null
|
|
|
|
$scope.promiseOfDevice = deviceService.get($routeParams.serial)
|
|
.then(function(device) {
|
|
$scope.device = device
|
|
$scope.control = controlService.forChannel(device.channel)
|
|
return device
|
|
})
|
|
}
|
|
|
|
app.controller('DeviceControlCtrl'
|
|
, [ '$scope'
|
|
, '$routeParams'
|
|
, 'DeviceService'
|
|
, 'ControlService'
|
|
, DeviceControlCtrl
|
|
])
|
|
})
|