Title: AngularFireModule from @angular/fire/compat not providing the database appropriately. · Issue #3683 · angular/angularfire · GitHub
Open Graph Title: AngularFireModule from @angular/fire/compat not providing the database appropriately. · Issue #3683 · angular/angularfire
X Title: AngularFireModule from @angular/fire/compat not providing the database appropriately. · Issue #3683 · angular/angularfire
Description: So I've been facing an issue for the past couple of days where whenever I try to use the AngularFireDatabase database to read or write to my Firebase database my console gives me the error: No provider found for Database2. Source: Standa...
Open Graph Description: So I've been facing an issue for the past couple of days where whenever I try to use the AngularFireDatabase database to read or write to my Firebase database my console gives me the error: No prov...
X Description: So I've been facing an issue for the past couple of days where whenever I try to use the AngularFireDatabase database to read or write to my Firebase database my console gives me the error: No ...
Opengraph URL: https://github.com/angular/angularfire/issues/3683
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"AngularFireModule from @angular/fire/compat not providing the database appropriately.","articleBody":"So I've been facing an issue for the past couple of days where whenever I try to use the **AngularFireDatabase** database to read or write to my Firebase database my console gives me the error:\n\n\u003cimg width=\"548\" height=\"499\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/b7f3a2eb-3822-4c63-b7bc-b238fabdc8dc\" /\u003e\n\n`No provider found for Database2. Source: Standalone[_Homecomponent].`\n\nI'm currently running Angular 20.0 as AngularFire 21.0 is yet to be fully fleshed out.\n\nMy dummy service to test the data looks like this below:\n\n\u003cimg width=\"1456\" height=\"429\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/7800cf59-3d09-401e-9a90-e840726985c0\" /\u003e\n\n`import { Injectable } from '@angular/core';`\n`import { AngularFireDatabase } from '@angular/fire/compat/database';`\n`@Injectable({`\n` providedIn: 'root'`\n`})`\n`export class Postingservice {`\n `constructor(private afDb:AngularFireDatabase){}`\n `viewPosts(){`\n `return this.afDb.list(\"/posts\").valueChanges();`\n `}`\n`}`\n\n\nI've both tried instantiating the afDb in the constructor and using the inject() function and neither have worked to any avail.\n\n\nHere also is my app.config.ts:\n\n\u003cimg width=\"1186\" height=\"505\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/af593c86-504d-4b81-9c7a-d80591410e75\" /\u003e\n\n`import { ApplicationConfig, provideBrowserGlobalErrorListeners, provideZoneChangeDetection } from '@angular/core';`\n`import { provideRouter } from '@angular/router';`\n\n`import { initializeApp, provideFirebaseApp } from '@angular/fire/app';`\n`import { getDatabase, provideDatabase } from '@angular/fire/database';`\n`import { routes } from './app.routes';`\n\n`export const appConfig: ApplicationConfig = {`\n ` providers: [`\n `provideBrowserGlobalErrorListeners(),`\n `provideZoneChangeDetection({ eventCoalescing: true }),`\n ` provideRouter(routes), `\n `provideFirebaseApp(() =\u003e `\n ` initializeApp({`\n `// FIREBASE CONFIG DATA`\n `})),`\n `provideDatabase(() =\u003e getDatabase()),`\n `]`\n`};`\n\nI've even provided the provideDatabase() function even as it's not necessary for the AngularFireDatabase as a provider and likewise it's been to no avail...\n\nAnd my application is bootstrapping correctly as it runs just fine until I create an instance of the afDb database in a component where I then get the above stated error. Kindly help.\n\n","author":{"url":"https://github.com/Neymar110","@type":"Person","name":"Neymar110"},"datePublished":"2025-11-30T12:58:57.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/3683/angularfire/issues/3683"}
| 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:e3275f14-489e-9d09-72fc-f8ca0f7da84e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C2A0:3D4228:86E513:BDD494:696E5FD8 |
| html-safe-nonce | 84dfcbacf250ca9e38526edfed4672d60b65516c8f5552cc435ddfbc89d4ee34 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMkEwOjNENDIyODo4NkU1MTM6QkRENDk0OjY5NkU1RkQ4IiwidmlzaXRvcl9pZCI6IjUxNTU5NzA5Nzc3NTcwMjgzMTIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 2086101d14918812b92b84077b2e2eed19e11d69eca3c55d56541610e3bcfdf6 |
| hovercard-subject-tag | issue:3677736517 |
| 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/3683/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5d3129e4b34b38e8739aa4c04adf09ef95962e3c6a71a9cce351dbb7f723066d/angular/angularfire/issues/3683 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5d3129e4b34b38e8739aa4c04adf09ef95962e3c6a71a9cce351dbb7f723066d/angular/angularfire/issues/3683 |
| og:image:alt | So I've been facing an issue for the past couple of days where whenever I try to use the AngularFireDatabase database to read or write to my Firebase database my console gives me the error: No prov... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Neymar110 |
| hostname | github.com |
| expected-hostname | github.com |
| None | f68b42d371252b0f236260d6234f4304a806fe5ac43d59faa21fb59d80df103b |
| 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 | 6b74bc8dbcd10b5d69fd9ee9d2cfdc8b35e18a4c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width