1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-04 02:09:32 +02:00
OpenSTF/res/app/scripts/controllers/DeviceListCtrl.js
2014-02-03 01:31:18 +09:00

30 lines
603 B
JavaScript

define(['./module'], function(mod) {
function DeviceListCtrl($scope, deviceService, groupService) {
$scope.devices = deviceService.devices
$scope.invite = function(device) {
groupService.invite({
serial: {
value: device.serial
, match: 'exact'
}
})
}
$scope.kick = function(device) {
groupService.kick({
serial: {
value: device.serial
, match: 'exact'
}
})
}
}
mod.controller('DeviceListCtrl'
, [ '$scope'
, 'deviceService'
, 'groupService'
, DeviceListCtrl
])
})