Closed cmellinas closed 9 years ago
Can you be more specific? It should work fine anywhere a Firebase reference works, including $firebaseArray.
I can't put a concrete example now (maybe tomorrow).
But I used a NormalizedCollection with two different ref.
Then I called $firebaseArray on norm.ref() (my new ref) and the array was empty (length 0)
However, norm.ref() shows results with $firebaseObject and .on Firebase events
Is it working on this example : http://firebase.github.io/firebase-util/#/toolbox/NormalizedCollection/example/messages ?
If it's the case, my refs should have an other issue. I would try to create a sample tomorrow.
It's perfectly possible there is a bug here--this is beta software. But I'd need to see a repro streamlined to the specific problem set to investigate.
Ok, I will post a specific example tomorrow.
Thanks,
Kato,
I created 2 jsiddle showing the issue :
1) this doesn't work: http://jsfiddle.net/cmellinas/Lvot0xaf/
2) this works: http://jsfiddle.net/cmellinas/uxLkv69d/
If I comment the ref.on the array is empty. It seems there is a race competition and the array is sometimes empty.
Have you an idea how to be sure the firebaseArray is full ?
Thanks,
Interestingly, it works as long as I attach and on('value'...) listener before passing it into $firebaseArray().
http://jsfiddle.net/katowulf/Lvot0xaf/2/
I'll investigate.
Yea, it's pretty weird.
Thanks, Kato,
I'm experiencing the same issue. The data from $firebaseArray()
flashes once into view and then disappears immediately. Attaching on('value' ...)
, as Kato suggested, works around that problem.
Fixed this in master. Will be in 0.2.3 release later today.
Hi,
This new 0.2 version brings lot of new cool stuffs, thanks,
Is this possible (maybe in the future) to use NormalizedCollection with $firebaseArray ?
$firebaseObject seems to work but not the array.