Free cookie consent management tool by TermsFeed Policy Generator

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

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

#2388: Added WebApp and WebApp.Status plugin

File size: 770 bytes
Line 
1(function () {
2    var moduleName = appLoginModule.getFullModuleName();
3    var module = appLoginModule.getAngularModule();
4    module.controller(appLoginModule.getControllerName(),
5        ['$scope', '$window', 'app.authentication.service', function ($scope, $window, authService) {
6            $scope.login = function () {
7                authService.login($scope.user, function (data) {
8                    if (!isDefined(data["Username"]) && !isDefined(data["Password"])) {
9                        $window.location.hash = "";
10                        $window.location.reload();
11                    } else {
12                        $scope.result = "error logging in";
13                    }
14                });
15            };
16        }]
17    );
18})();
Note: See TracBrowser for help on using the repository browser.