walnut_launchpad.html/js/controllers/signInController.js

16 lines
470 B
JavaScript
Raw Normal View History

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