Title: [idea] Make second parameter of /list an Observable, not just the inner values · Issue #389 · angular/angularfire · GitHub
Open Graph Title: [idea] Make second parameter of /list an Observable, not just the inner values · Issue #389 · angular/angularfire
X Title: [idea] Make second parameter of /list an Observable, not just the inner values · Issue #389 · angular/angularfire
Description: I have a list of employees. Every employee has a name and and active property, e.g. { name: "Dirk Postma", active: true } In my view I'd like to be able to filter by active flag, for example: this.filteredItems = af.database.list('employ...
Open Graph Description: I have a list of employees. Every employee has a name and and active property, e.g. { name: "Dirk Postma", active: true } In my view I'd like to be able to filter by active flag, for example: this....
X Description: I have a list of employees. Every employee has a name and and active property, e.g. { name: "Dirk Postma", active: true } In my view I'd like to be able to filter by active flag, for ...
Opengraph URL: https://github.com/angular/angularfire/issues/389
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[idea] Make second parameter of /list an Observable, not just the inner values","articleBody":"I have a list of employees. Every employee has a name and and active property, e.g.\n\n```\n{\n name: \"Dirk Postma\",\n active: true\n}\n```\n\nIn my view I'd like to be able to filter by active flag, for example:\n\n```\nthis.filteredItems = af.database.list('employees', {\n query: {\n orderByChild: 'active',\n equalTo: this.querySubject\n }\n});\n\ntoggleActiveFilter() {\n this.showActive = !this.showActive;\n this.querySubject.next(this.showActive);\n}\n```\n\nThis works, great stuff!\n\nNow one step further: I'd like to be able to show either active employees or ALL employees (both active and inactive). I would like to have something like this:\n\n```\nthis.filteredItems = af.database.list('employees', this.querySubject });\n\ntoggleActiveFilter() {\n this.showActive = !this.showActive;\n\n if (this.showActive) {\n // Show active employees only\n this.querySubject.next({\n query: {\n orderByChild: 'active',\n equalTo: true\n }\n });\n } else {\n // show all employees\n this.querySubject.next(null);\n }\n}\n```\n\nBasically: make the second parameter itself an Observable in stead of just the inner values of e.g. equalTo.\n\nIs this an idea?\n","author":{"url":"https://github.com/dirkpostma","@type":"Person","name":"dirkpostma"},"datePublished":"2016-07-26T13:57:13.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/389/angularfire/issues/389"}
| 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:d3a82f0b-c135-dd60-aa86-fcb1ab835152 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B41C:F479:74A125:97B36E:6A5AD00F |
| html-safe-nonce | 1427808666d3aa3bb55ff6b4344da422851af2e93ce291ab8421f995dc672c4a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNDFDOkY0Nzk6NzRBMTI1Ojk3QjM2RTo2QTVBRDAwRiIsInZpc2l0b3JfaWQiOiI5MDg2NzkxODg5NjQ3NzUxMTgzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 269edc45167d4be589ab6bc1429a0e0ff59d18a0309cbbb0f1550a40e0b26b79 |
| hovercard-subject-tag | issue:167613689 |
| 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/389/issue_layout |
| twitter:image | https://opengraph.githubassets.com/71a200d75870006cebb9e0807133d56fd22b11943269b962b13882f48c3f8b39/angular/angularfire/issues/389 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/71a200d75870006cebb9e0807133d56fd22b11943269b962b13882f48c3f8b39/angular/angularfire/issues/389 |
| og:image:alt | I have a list of employees. Every employee has a name and and active property, e.g. { name: "Dirk Postma", active: true } In my view I'd like to be able to filter by active flag, for example: this.... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dirkpostma |
| hostname | github.com |
| expected-hostname | github.com |
| None | 887a0902ea4987c46dd44cbc73dfadecb93a29560d7519a576fcecd81716148c |
| 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 | 2606513ce6b72f8b775db6a60283f9cf7d4d70a5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width