12 lines
377 B
JavaScript
12 lines
377 B
JavaScript
app.controller('SignInController', ['$scope', 'Auth', '$location', function ($scope, Auth, $location) {
|
|
var vm = this;
|
|
vm.sign_in = function () {
|
|
// Ask to the server, do your job and THEN set the user
|
|
var user = {
|
|
email: "john@doe.com"
|
|
};
|
|
Auth.setUser(user); //Update the state of the user in the app
|
|
$location.path('/launchpad-home');
|
|
};
|
|
}]);
|