walnut_launchpad.html/js/controllers/signInController.js

16 lines
470 B
JavaScript

app.controller('SignInController', ['$scope', 'Auth', '$location', 'localStorageService', '$rootScope', function ($scope, Auth, $location, localStorageService, $rootScope) {
var vm = this;
vm.signIn = function () {
var userInfo = {
email: vm.userAuthEmail,
name: 'Johnny Cash'
};
Auth.setUser(userInfo);
var userAuthenticated = function() {
return localStorageService.set('userAuth', JSON.stringify(userInfo));
}();
};
}]);