Files
stf-DeviceFarmer/res/app/device-control/device-control-controller.js
2014-02-19 15:46:31 +09:00

11 lines
365 B
JavaScript

module.exports = 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
})
}