How do I reverse the order of records returned by <firebase-collection>
as follows:
<firebase-collection id="foo" order-by-child="bar">
?
Can I do it declaratively? Or do I need to call an imperative method like maybe...
this.$.foo = this.$.foo.reverse();
https://elements.polymer-project.org/elements/firebase-element?active=firebase-collection
Note: I'm using <iron-list>
and not <template is="dom-repeat">
.
Simplest is just to use a
<dom-repeat>
with an inverse sort I believe.Per https://www.polymer-project.org/1.0/docs/devguide/templates.html#filtering-and-sorting-lists
The best solution is to use
http://jsbin.com/vizexodoyi/1/edit?html,output<iron-list>
then sort that according to this answer.