Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- myApp.controller('loginCtrl',['$scope','$firebaseAuth','config',function($scope,$firebaseAuth,config){
- console.info('[APP-INFO] ~ loginCtrl Start')
- var ref = new Firebase('https://myauth-tadmit.firebaseio.com/');
- var auth = $firebaseAuth(ref);
- $scope.register = function(){
- auth.$createUser({
- email: $scope.user.email,
- password: $scope.user.password
- }).then(function(regUser){
- console.log('RegComplete User:' )
- }).catch(function(error){
- console.log(error.message)
- });
- }
- }]);
- Projects created at console.firebase.google.com must use the new Firebase Authentication SDKs available from firebase.google.com/docs/auth/
- <script src="https://cdn.firebase.com/js/client/2.2.4/firebase.js"></script>
- <script src="https://cdn.firebase.com/libs/angularfire/1.2.0/angularfire.min.js"></script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement