Advertisement
Guest User

Untitled

a guest
Aug 8th, 2016
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. myApp.controller('loginCtrl',['$scope','$firebaseAuth','config',function($scope,$firebaseAuth,config){
  2.  
  3. console.info('[APP-INFO] ~ loginCtrl Start')
  4.  
  5. var ref = new Firebase('https://myauth-tadmit.firebaseio.com/');
  6. var auth = $firebaseAuth(ref);
  7.  
  8. $scope.register = function(){
  9. auth.$createUser({
  10. email: $scope.user.email,
  11. password: $scope.user.password
  12. }).then(function(regUser){
  13. console.log('RegComplete User:' )
  14. }).catch(function(error){
  15. console.log(error.message)
  16. });
  17. }
  18.  
  19. }]);
  20.  
  21. Projects created at console.firebase.google.com must use the new Firebase Authentication SDKs available from firebase.google.com/docs/auth/
  22.  
  23. <script src="https://cdn.firebase.com/js/client/2.2.4/firebase.js"></script>
  24. <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