walnut_launchpad.html/js/controllers/signInController.js

18 lines
529 B
JavaScript
Raw Normal View History

2017-08-08 20:54:25 +00:00
app.controller('SignInController', ['$scope', 'loginStatus', '$location', function ($scope, loginStatus, $location) {
var vm = this;
vm.userProfile = {};
// vm.message = loginStatus;
vm.sign_in = function() {
vm.userProfile.email = vm.userAuthEmail;
vm.userProfile.password = vm.userAuthPassword;
if (vm.userProfile.email === loginStatus.email && vm.userProfile.password === loginStatus.password) {
console.log('yes!');
$location.path('/home');
} else {
alert("wrong")
}
};
}]);