mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-20 01:03:30 +02:00
Attempting to make it easier to work with a single device. Still not bound to the new controlService.
This commit is contained in:
17
res/app/scripts/controllers/DeviceControlCtrl.js
Normal file
17
res/app/scripts/controllers/DeviceControlCtrl.js
Normal file
@@ -0,0 +1,17 @@
|
||||
define(['./module'], function(mod) {
|
||||
function DeviceControlCtrl($scope, $routeParams, deviceService) {
|
||||
$scope.device = null
|
||||
|
||||
deviceService.get($routeParams.serial)
|
||||
.then(function(device) {
|
||||
$scope.device = device
|
||||
})
|
||||
}
|
||||
|
||||
mod.controller('DeviceControlCtrl'
|
||||
, [ '$scope'
|
||||
, '$routeParams'
|
||||
, 'deviceService'
|
||||
, DeviceControlCtrl
|
||||
])
|
||||
})
|
||||
Reference in New Issue
Block a user