2014-06-22 00:41:40 +00:00
|
|
|
'use strict';
|
|
|
|
|
2014-06-22 02:40:21 +00:00
|
|
|
angular.module('app').controller("MainCtrl", function($scope, $http, users) {
|
|
|
|
$scope.state=0
|
|
|
|
$scope.user = users.getCurrent().success(function (user) {
|
|
|
|
$scope.user = user;
|
|
|
|
$scope.state = 1;
|
|
|
|
})
|
|
|
|
.error(function (error) {
|
|
|
|
$scope.user = undefined;
|
|
|
|
$scope.state = 1;
|
|
|
|
});
|
2014-06-22 00:41:40 +00:00
|
|
|
});
|