Initial device control implementation. Works with touches and NUMERIC keycodes.

This commit is contained in:
Simo Kinnunen
2014-02-06 11:54:19 +09:00
parent ad0651a3b6
commit 0e0783b649
5 changed files with 88 additions and 54 deletions

View File

@@ -1,10 +1,12 @@
define(['./_module'], function(controllers) {
function DeviceControlCtrl($scope, $routeParams, deviceService) {
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)
})
}
@@ -12,6 +14,7 @@ define(['./_module'], function(controllers) {
, [ '$scope'
, '$routeParams'
, 'DeviceService'
, 'ControlService'
, DeviceControlCtrl
])
})