(function () {
    "use strict";

    angular.module('app')
        .controller('LoginController', ['$scope' , function ($scope) {

        }]);
})();









@@ -30,16 +30,18 @@
 t%22;%0A%0A   
+/*
  angular
@@ -110,29 +110,2399 @@
 ' , 
-function ($scope) %7B%0A%0A
+'$http', '$log', '$cookieStore', '$location', function ($scope, $http, $log, $cookieStore, $location) %7B%0A            $scope.errorMsg = null;%0A%0A            $scope.logUser = function () %7B%0A                $http.post('/api/login', %7Blogin: $scope.login, password: $scope.password%7D)%0A                    .success(function (user) %7B%0A                        $log.info('Authentication successed !');%0A                        $cookieStore.put('user', user);%0A                        $location.path('/');%0A%0A                    %7D)%0A                    .error(function (reason) %7B%0A                            $log.error('unable to log  ' + reason);%0A                            $scope.errorMsg = %22Bad Login and/or password%22;%0A                    %7D);%0A%0A            %7D;%0A        %7D%5D);*/%0A    %0A    angular.module('app').controller('LoginController', %5B '$rootScope','$scope', '$location','AuthenticationSharedService',%0A                                       function ( $rootScope,$scope, $location,AuthenticationSharedService)  %7B%0A    %09 %09%09%09%09%09%09%09%09   $scope.errorMsg = null;%09%0A                                           $scope.logUser = function () %7B%0A                                               AuthenticationSharedService.login(%7B%0A                                                   username: $scope.login,%0A                                                   password: $scope.password,%0A                                             %0A                                               %7D).then(function () %7B%0A                                                   $scope.authenticationError = false;%0A                                                   $rootScope.authenticated = true;%0A                                                   $location.path(%22/%22);%0A                                               %7D).catch(function () %7B%0A                                                   $scope.authenticationError = true;%0A                                                   $rootScope.authenticated = false;%0A                                               %7D);%0A                                           %7D%0A                                       %7D%5D);%0A%0A    angular.module('app').controller('LogoutController', %5B'$location', 'AuthenticationSharedService',%0A                                     function ($location, AuthenticationSharedService) %7B%0A                                          AuthenticationSharedService.logout();%0A                               
     

Update LoginController