Closed michaeldim closed 9 years ago
I think you should use orderByChild() instead.
There aren't any children to order by in the master index.
Note that you can use orderByValue() on the master ref (e.g. fb.child('event1').orderByValue()
) before passing it into NormalizedCollection to achieve the same effect and improve efficiency.
@katowulf Once the NormalizedCollection is added, even if orderByValue() is passed in the master ref it still doesn't order correctly. http://embed.plnkr.co/VP9k55/preview. I'm not particularly concerned now you have added a fix, but I thought it worth mentioning.
Will be fixed soon, probably today. orderByValue() on the master ref achieves the same effect.
OK thanks.
@katowulf Using the master branch 948cc685e01baf19a32832f44f14053818609ce5, queries still don't appear to be working on the index ref, http://plnkr.co/edit/GR6iAo?p=preview
@michaeldim The title of this issue is "Error using orderByValue()"; I don't see that error being thrown in your plunker. Although I do see that limitToFirst() isn't working (which sounds like a new issue).
Ok ill open up a new issue for limitToFirst(). Although orderByValue() is not sorting the data in the correct order.
Also not the problem described here, but probably worthy of an issue.
Related to: #28, I can't seem to apply a query on the master index using the orderByValue() method. An 'undefined is not a function' error is returned, http://plnkr.co/edit/HaA1lz