angularfire icon indicating copy to clipboard operation
angularfire copied to clipboard

Descend order by firebase.database.servervalue.timestamp

Open profesori opened this issue 9 years ago • 1 comments

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

profesori avatar Aug 28 '17 12:08 profesori

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.

davideast avatar Sep 01 '17 15:09 davideast