mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-20 12:55:26 +02:00
Load devices with Oboe.
This commit is contained in:
@@ -1,5 +1,12 @@
|
||||
define(['./module'], function(mod) {
|
||||
mod.controller('DeviceListCtrl', ['$scope', '$http', 'devices', function($scope, $http) {
|
||||
define(['./module', 'oboe'], function(mod, oboe) {
|
||||
mod.controller('DeviceListCtrl', ['$scope', function($scope) {
|
||||
$scope.devices = []
|
||||
|
||||
oboe('/api/v1/devices')
|
||||
.node('$devices[*]', function(devicesLoadedSoFar) {
|
||||
$scope.$apply(function() {
|
||||
$scope.devices = devicesLoadedSoFar
|
||||
})
|
||||
})
|
||||
}])
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user