I would like to get Most Popular posts with highest number of UpVotes one after another.
this.nextPostObservableList= this.af.database.list('/listOfPost',{
query :{
orderByChild : 'postUpvote',
limitToLast : 2,
endAt : this.currentPost.postUpvote
}
});
In this case if I orderByChild with postUpvote, I am able to navigate one after another. But if Multiple Posts have same upVote count then I am not able to navigate (Greater than 2 as per above code snippet). Beyond post2 in the below scenario. Please suggest a solution.
{
"post1" : {
"postUpvote" : 10,
"postname" : "sample 1"
},
"post2" : {
"postUpvote" : 10,
"postname" : "Sample 2"
},
"post3" : {
"postUpvote" : 20,
"postname" : "sample3"
},
"post4" : {
"postUpvote" : 10,
"postname" : "sample4"
}
}