无法通过AngularJs在Firebase中保存数据

时间:2017-07-14 07:38:55

标签: angularjs firebase firebase-authentication angularfire

Auth工作正常并成功创建用户,但无法在数据库中保存其他注册数据。

获取错误

  

ReferenceError:未定义Firebase

enter image description here

{{1}}

更新 Firebase:4.1.3 AngularFire:2.2.0

1 个答案:

答案 0 :(得分:0)

------------------
ignore few bootstrap references
-----------------

--------------Angularjs-----
controller
--------------
            var vm = this;
            vm.user = {};
            vm.anurag = function() {
                $("[data-toggle = 'popover']").popover();
            };

            vm.registerUser = function() {
                firebaseService.signUp(vm.user.email, vm.user.password)
                    .then(firebaseServiceSuccess)
                    .catch(firebaseServiceFail);
            }
--------------------
factory service
 function signUp(email, password) {
            return firebase.auth().createUserWithEmailAndPassword(email, password);
        }