harness-drone/server/app/scripts/controllers/login.js

13 lines
341 B
JavaScript
Raw Normal View History

2014-07-13 02:01:58 +00:00
'use strict';
angular.module('app').controller("LoginController", function($scope, $http, remotes) {
$scope.state=0
$scope.user = remotes.getLogins().success(function (data) {
$scope.remotes = (typeof data==="string")?[]:data;
$scope.state = 1;
})
.error(function (error) {
$scope.remotes = [];
$scope.state = 1;
});
});