Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HiveStatistics/sources/HeuristicLab.Services.WebApp/3.3/WebApp/plugins/login/loginCtrl.js @ 12558

Last change on this file since 12558 was 12558, checked in by dglaser, 9 years ago

#2388: Merged trunk into HiveStatistics branch

File size: 725 bytes
Line 
1(function () {
2    var module = appLoginPlugin.getAngularModule();
3    module.controller('app.login.ctrl',
4        ['$scope', '$window', 'app.authentication.service', function ($scope, $window, authService) {
5            $scope.login = function () {
6                authService.login($scope.user, function (data) {
7                    if (!isDefined(data["Username"]) && !isDefined(data["Password"])) {
8                        $window.location.hash = "";
9                        $window.location.reload();
10                    } else {
11                        $scope.result = "Invalid username or password. Please try again.";
12                    }
13                });
14            };
15        }]
16    );
17})();
Note: See TracBrowser for help on using the repository browser.