Title: Firebase API called outside injection context - missing details on how to fix this · Issue #3629 · angular/angularfire · GitHub
Open Graph Title: Firebase API called outside injection context - missing details on how to fix this · Issue #3629 · angular/angularfire
X Title: Firebase API called outside injection context - missing details on how to fix this · Issue #3629 · angular/angularfire
Description: I am using the "^19.0.0" version of this package with newly created angular application using ng new (angular 19). Note that I have chosen options to enable ssr while creating the angular app using ng new. Now, a simple code like: import...
Open Graph Description: I am using the "^19.0.0" version of this package with newly created angular application using ng new (angular 19). Note that I have chosen options to enable ssr while creating the angular app using...
X Description: I am using the "^19.0.0" version of this package with newly created angular application using ng new (angular 19). Note that I have chosen options to enable ssr while creating the angular...
Opengraph URL: https://github.com/angular/angularfire/issues/3629
X: @github
Domain: github.com
IPv4 address: 140.82.112.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Firebase API called outside injection context - missing details on how to fix this","articleBody":"I am using the `\"^19.0.0\"` version of this package with newly created angular application using `ng new` (angular 19).\n \nNote that I have chosen options to enable ssr while creating the angular app using `ng new`.\n\nNow, a simple code like:\n\n```typescript\nimport { Component, OnInit } from '@angular/core';\nimport { RouterOutlet } from '@angular/router';\nimport { AsyncPipe, JsonPipe } from '@angular/common';\nimport { Observable } from 'rxjs';\nimport { Firestore, doc, docData } from '@angular/fire/firestore';\n\n@Component({\n selector: 'app-root',\n imports: [RouterOutlet, AsyncPipe, JsonPipe],\n template: `\n \u003cdiv>\n Data from Firestore:\n \u003cpre>{{ item$ | async | json }}\u003c/pre>\n \u003c/div>\n `,\n styleUrl: './app.component.scss'\n})\nexport class AppComponent implements OnInit {\n title = 'bla';\n item$: Observable\u003cany> | undefined;\n\n constructor(private firestore: Firestore) {}\n\n ngOnInit(): void {\n this.item$ = this.getDocument('test/BnKno4vcZKHqXrRbyFye');\n }\n\n getDocument(path: string): Observable\u003cany> {\n const documentReference = doc(this.firestore, path);\n return docData(documentReference);\n }\n}\n```\ngive the following warnings (but the code is working):\n```\nCalling Firebase APIs outside of an Injection context may destabilize your application leading to subtle change-detection and hydration bugs. Find more at https://github.com/angular/angularfire/blob/main/docs/zones.md\nFirebase API called outside injection context: docData\nFirebase API called outside injection context: docData\n```\n**If angular fire could elaborate this error a bit saying what we have to do to fix this, that would be very nice.**","author":{"url":"https://github.com/vajahath","@type":"Person","name":"vajahath"},"datePublished":"2025-02-25T13:43:33Z","url":"https://github.com/angular/angularfire/issues/3629"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:14ac5008-a05e-202b-34fd-b6ade8303afa |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8F66:293912:3305AD2:4364606:6B03600B |
| html-safe-nonce | 7d1edba505bf1653e1c1269c58250dd58a931b78d96d5b9afa53e75e51da4420 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RjY2OjI5MzkxMjozMzA1QUQyOjQzNjQ2MDY6NkIwMzYwMEIiLCJ2aXNpdG9yX2lkIjoiNDIxNjU4NTAxNjUyMTc0NDM5NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | f2398b9d72a39a2382f9768e40203784d682c8b1e0b2bcb9741422c590bdab81 |
| hovercard-subject-tag | issue:2878446119 |
| 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/3629/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ae66e20136ad58a4b30517f6cb0ad8e6a2e44b8373c431d12111eaa456f7671e/angular/angularfire/issues/3629 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ae66e20136ad58a4b30517f6cb0ad8e6a2e44b8373c431d12111eaa456f7671e/angular/angularfire/issues/3629 |
| og:image:alt | I am using the "^19.0.0" version of this package with newly created angular application using ng new (angular 19). Note that I have chosen options to enable ssr while creating the angular app using... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | vajahath |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| 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 | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width