Created
August 27, 2014 20:49
-
-
Save AndriyShepitsen/288646e2d87168a6c052 to your computer and use it in GitHub Desktop.
Log
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$scope.fenLogin = function (email, pass) { | |
if (_.isEmpty(email) || _.isEmpty(pass)) { | |
$scope.loginError = true; | |
return; | |
} | |
var mainRef = new Firebase(url); | |
var auth = $firebaseSimpleLogin(mainRef); | |
auth.$login('password', { | |
email: email, | |
password: pass | |
}).then(function (user) { | |
$state.go('admin'); | |
$scope.loginError = false; | |
}, function () { | |
$scope.loginError = true; | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment