Blame view
app/views/login/login.controller.js
534 Bytes
5c6477d3d
|
1 2 3 |
'use strict'; //Load controller |
9835dbe3e
|
4 |
angular.module('acuefuel') |
5c6477d3d
|
5 |
|
22d319238
|
6 |
.controller('LoginController', function ($scope, $state, LoginService) { |
5c6477d3d
|
7 8 9 10 |
$scope.user = {}; $scope.userData = function(){ |
0a4eb77cc
|
11 12 |
var loginData = "username=" + $scope.user.username + "&password=" + $scope.user.password; LoginService.loginUser(loginData).then(function(result) { |
cf2b34983
|
13 14 15 |
LoginService.authenticate(); LoginService.setAuth(true); |
0a4eb77cc
|
16 17 |
}) |
5c6477d3d
|
18 19 20 |
} }); |