walnut_launchpad.html/js/controllers/signInController.js

16 lines
470 B
JavaScript
Raw Normal View History

2017-08-10 17:36:59 +00:00
app.controller('SignInController', ['$scope', 'Auth', '$location', 'localStorageService', '$rootScope', function ($scope, Auth, $location, localStorageService, $rootScope) {
2017-08-08 20:54:25 +00:00
var vm = this;
2017-08-09 17:28:36 +00:00
2017-08-10 17:36:59 +00:00
vm.signIn = function () {
2017-08-09 17:28:36 +00:00
var userInfo = {
2017-08-11 19:21:35 +00:00
email: vm.userAuthEmail,
name: 'Johnny Cash'
2017-08-09 04:23:19 +00:00
};
2017-08-09 17:28:36 +00:00
Auth.setUser(userInfo);
var userAuthenticated = function() {
return localStorageService.set('userAuth', JSON.stringify(userInfo));
}();
2017-08-08 20:54:25 +00:00
};
2017-08-10 22:33:54 +00:00
2017-08-08 20:54:25 +00:00
}]);