/**
* Created by zx- on 7.10.2015.
*/
'use strict';
/**
* Home controller
* @ngdoc function
* @name suxessControllers.controller:HomeController
* @description Basic example home controller
* @requires $scope - to store values
* @requires $rootScope - to access user
* A description of the controller, service or filter
*/
suxessControllers.controller('HomeController', [
'$scope',
'$state',
'$rootScope',
'$uibModal',
function( $scope, $state ,$rootScope, $uibModal ){
$scope.headerText = 'Suxess TP1';
$scope.teamPageLink = 'http://rarcoo.synology.me/~suxess';
$scope.signIn = true;
$scope.signUp = false;
$scope.setSignIn = function (){
$scope.signIn = true;
$scope.signUp = false;
};
$scope.setSignUp = function (){
$scope.signUp = true;
$scope.signIn = false;
};
$rootScope.$watch('userIsLogged', function() {
if ($rootScope.userIsLogged) {
console.log('logged in on home page, redirecting to dashboard');
$state.go('project');
}
});
}
]);