fixing an error with the gage loading at page reload

This commit is contained in:
Lucas Pleß 2014-07-23 03:33:36 +02:00
parent 52aa2837df
commit 97a07163f2
1 changed files with 2 additions and 2 deletions

View File

@ -10,8 +10,8 @@ angular.module('roomstateapp.controllers', []).
url: '/api/simple/v2'
}).
success(function (data, status, headers, config) {
gpower.refresh(message.data.power);
$scope.simple = data;
gpower.refresh(data.power);
}).
error(function (data, status, headers, config) {
//$scope.name = 'Error!'
@ -20,8 +20,8 @@ angular.module('roomstateapp.controllers', []).
Socket.on('sdata', function(message) {
console.log("received data from server: " + message.data.names);
gpower.refresh(message.data.power);
$scope.simple = message.data;
gpower.refresh(message.data.power);
});
});