1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-04 18:29:17 +02:00

Load devices with Oboe.

This commit is contained in:
Simo Kinnunen 2014-01-31 05:10:38 +09:00
parent c119e2c3d2
commit 4c45a7288b
3 changed files with 30 additions and 7 deletions

View file

@ -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
})
})
}])
})