1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-06 03:50:04 +02:00
OpenSTF/res/app/scripts/controllers/DeviceControlCtrl.js
2014-02-06 15:11:26 +09:00

20 lines
512 B
JavaScript

define(['./_module'], function(app) {
function DeviceControlCtrl($scope, $routeParams, deviceService, controlService) {
$scope.device = null
$scope.control = null
deviceService.get($routeParams.serial)
.then(function(device) {
$scope.device = device
$scope.control = controlService.forChannel(device.channel)
})
}
app.controller('DeviceControlCtrl'
, [ '$scope'
, '$routeParams'
, 'DeviceService'
, 'ControlService'
, DeviceControlCtrl
])
})