firebase - AngularFire 2.0 $firebaseAuth(ref); - TypeError: a.onAuthStateChanged is not a function -


using angularfire 2.0 , calling following code:

app.factory("auth", ["$firebaseauth" , "servername",   function($firebaseauth,  servername) {     var ref = firebase.database().ref();         var auth = $firebaseauth(ref);          return auth;   } ]); 

i following message:

angular.js:13550 typeerror: a.onauthstatechanged not function     @ angularfire.min.js:12     @ object.n [as promise] (angular.js:16225)     @ object.a._initauthresolver (angularfire.min.js:12)     @ object.a (angularfire.min.js:12)     @ angularfire.min.js:12     @ object.<anonymous> (default.js:6)     @ object.invoke (angular.js:4665)     @ object.$get (angular.js:4504)     @ object.invoke (angular.js:4665)     @ angular.js:4464 

at : var auth = $firebaseauth(ref);

i using latest sdk's stated here:

https://github.com/firebase/angularfire/blob/master/docs/quickstart.md

i've tried

var auth = $firebaseauth();      

and worked me. (note $firebaseauth without ref var inside). don't take granted though. don't know consequences might (or maybe docs of angularfire 2.0 not date yet).


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

python 3.x - PyQt5 - Signal : pyqtSignal no method connect -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)