angularfire
angularfire copied to clipboard
Descend order by firebase.database.servervalue.timestamp
Hi,
I want to order firebase data by date and i'm using firebase.database.ServerValue.TIMESTAMP when i store data to firebase :
const exp = new Experiment();
var dateTime = firebase.database.ServerValue.TIMESTAMP
exp.creation = dateTime;
exp.reverseCreation = 0-dateTime;
exp.name = name;
So i'm setting a negative value for exp.reverseCreation to have a descend order in the query.The problem is i can't store a negative firebase.database.ServerValue.TIMESTAMP cause incompatible types. Is there a solution for that ?
Thanks
HI @profesori ! I'm closing this issue because it does not follow our issue template. It's important to get all the details in the template so we can help you as efficiently as possible. Feel free to open a new one that follows the template.