Title: Passing an optional parameter to startAt() when querying FirebaseListObservable · Issue #362 · angular/angularfire · GitHub
Open Graph Title: Passing an optional parameter to startAt() when querying FirebaseListObservable · Issue #362 · angular/angularfire
X Title: Passing an optional parameter to startAt() when querying FirebaseListObservable · Issue #362 · angular/angularfire
Description: Hey, I'm using a FirebaseListObservable to retrieve some messages from firebase and I was wondering how to use the firebase query startAt() method inside the query object. It's not a simple startAt(value) call, since I need to pass in th...
Open Graph Description: Hey, I'm using a FirebaseListObservable to retrieve some messages from firebase and I was wondering how to use the firebase query startAt() method inside the query object. It's not a simple startAt...
X Description: Hey, I'm using a FirebaseListObservable to retrieve some messages from firebase and I was wondering how to use the firebase query startAt() method inside the query object. It's not a simple...
Opengraph URL: https://github.com/angular/angularfire/issues/362
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Passing an optional parameter to startAt() when querying FirebaseListObservable","articleBody":"Hey,\n\nI'm using a FirebaseListObservable to retrieve some messages from firebase and I was wondering how to use the firebase query startAt() method inside the query object. It's not a simple startAt(value) call, since I need to pass in the optional \"key\" parameter. However, it seems that there's no easy or straightforward way to accomplish that within the query object.\n\nI tried the following: \n\n``` javascript\n this.af.database.list('/messages', { \n query: { \n orderByChild: 'date', \n startAt: {value: 'Some date', key: 'some key'}, //key is the optional parameter \n limitToFirst: 10\n }\n })\n```\n\nbut the firebase library (not angularfire2) complains: \n\nORIGINAL EXCEPTION: Error: Query: First argument passed to startAt(), endAt(), or equalTo() cannot be an object.\n\nThe startAt method can receive an optional parameter \"key\", as described in the firebase docs:\nhttps://firebase.google.com/docs/reference/js/firebase.database.Query#startAt\n\nI even tried $value and $key as the object properties, but firebase threw another Error.\n\nIs this impossible to do with angularfire or is there a different syntax to do it?\n\nThis is how the query looks like with vanilla firebase:\nfirebase.database().ref('/messages').orderByChild('date').startAt(startAtValue, someKey).limitToFirst(10);\n","author":{"url":"https://github.com/lf-alves","@type":"Person","name":"lf-alves"},"datePublished":"2016-07-16T23:03:43.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":11},"url":"https://github.com/362/angularfire/issues/362"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:754d4c7c-7d44-42ab-e44d-0d19e9a7a57f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9ADE:22075F:4D7B00:673CA0:6A5B6CAD |
| html-safe-nonce | f161c96688eaedec9270d1b256c9e6a4ee9ba52561a5d0645a104ee82198b3b7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QURFOjIyMDc1Rjo0RDdCMDA6NjczQ0EwOjZBNUI2Q0FEIiwidmlzaXRvcl9pZCI6IjUxMzUzNTkzNTI0MDk2NDgzMDEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 3b6aa489e69e47fde0f1a649fe4d7e8be07510b27c0c1e9a419fd40d11a8f9c6 |
| hovercard-subject-tag | issue:165951526 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angularfire/362/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1b1c8be1c1ecba6b4f9a9b877a6d17d63158e1c6d477b31f3065038005492db4/angular/angularfire/issues/362 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1b1c8be1c1ecba6b4f9a9b877a6d17d63158e1c6d477b31f3065038005492db4/angular/angularfire/issues/362 |
| og:image:alt | Hey, I'm using a FirebaseListObservable to retrieve some messages from firebase and I was wondering how to use the firebase query startAt() method inside the query object. It's not a simple startAt... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | lf-alves |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angularfire git https://github.com/angular/angularfire.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 49453413 |
| octolytics-dimension-repository_nwo | angular/angularfire |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49453413 |
| octolytics-dimension-repository_network_root_nwo | angular/angularfire |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9c975978430e9ad293956f2bbdaf153b1bd84a99 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width