FirebaseExtended / angularfire

AngularJS bindings for Firebase
MIT License
2.73k stars 632 forks source link

$bind after :login fails #332

Closed mrbbdx closed 9 years ago

mrbbdx commented 9 years ago

Looks like _loaded = false if my fbRef is not immediately before my $bind. Please see http://plnkr.co/edit/H7Z7NPc9M5kEtWS9EvrK?p=preview and switch the comments between line 33 and 38 to see it work as expected.

katowulf commented 9 years ago

When you call $firebase(ref), it is attempting to load data from that path. A quick look at the JavaScript console reveals this:

FIREBASE WARNING: on() or once() for /msgString failed: Error: permission_denied: Client doesn't have permission to access the desired data.

Thus your explanation. To read the path specified you need to be authenticated. Obviously, that doesn't happen until after $firebaseSimpleLogin:login returns. Which is why it works after auth.

Cheers,

mrbbdx commented 9 years ago

OOOOohhhh. that makes sense. thx.