16 lines
470 B
JavaScript
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));
|
|
}();
|
|
};
|
|
|
|
}]);
|