Created
November 5, 2016 01:59
-
-
Save GeneralistDev/0f3e9ccc0ecde146ac4f8530e994220a to your computer and use it in GitHub Desktop.
Firebase query 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getMostRecentActivity(count) { | |
var questionsNode = ref.child('discussions').child('data'); | |
// create a query for the most recent 25 messages on the server | |
var query = questionsNode.orderByChild("updatedTimestamp"); | |
return $firebaseArray(query.limitToLast(count)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment