I'm pretty certain using the try{} was a mistake here, and yielding null
causing more trouble than it was worth (go figure).

Is my understanding correct that if I attempt to get a child($id) and it
doesn't exist, Firebase returns, essentially, an empty object ready to be
$save or three-way binded up?
On Tuesday, October 6, 2015 at 11:43:46 AM UTC-6, Justin Martiniak wrote:

(Sorry if I double posted, ain't ever use google groups)

I've chosen to use Firebase as a simple means to handle authentication and
store my over-the-air data... but I'm running into an issue (occasionally).

I'm using angularFire, so whenever I access data I have the ability to get
a $firebaseObject, $firebaseArray or null.

The null part is what catches me off guard... None of the tutorials or
demos I see go through how to handle the null aspect of the request... they
just go ahead and bind the data to $scope or check if it's $loaded() all
things which wont work with null; and then this cascades into other issues
surfacing and potentially just white/empty views.

So how, or what, is the best way to access data from Firebase that might
not be there?
You received this message because you are subscribed to the Google Groups "Firebase + AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-angular+unsubscribe@googlegroups.com.
To post to this group, send email to firebase-angular@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-angular/2e61f4b8-b105-4b73-8ba1-736c17a5e050%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts


Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 8 of 9 | next ›
Discussion Overview
groupfirebase-angular @
postedOct 6, '15 at 5:43p
activeOct 6, '15 at 9:33p



site design / logo © 2021 Grokbase