Questions tagged firebase-realtime-database

Explore the latest questions and answers asked by our top developers.

ionic angularfire using v9 and realtime database upgrade

I am trying to use angular 12 and firebase latest modular sdk for my ionic app. I am using realtime database and having hard time finding the changes i need to do on the data handling part. below is my new app.module.ts import { provideFirebaseApp, initializeApp } from ‘@angular/fire/app’; import { getDatabase, provideDatabase } from […]

Firebase Realtime database count active users by status value

I have a service that detects the presence when the user is online, away and offline in firebase. presence.service.ts import { Injectable } from "@angular/core"; import { AngularFireAuth } from "@angular/fire/auth"; import { AngularFireDatabase } from "@angular/fire/database"; import * as firebase from "firebase/app"; import { tap, map, switchMap, first } from "rxjs/operators"; import { of […]

How to set a variable in firebase realtime-database rules

So my database looks like this And my rules look like this: { "rules": { ".read": true, ".write": true, "_default_user":{ <—- this is what I need to change "cart":{ ".indexOn": "product/id" } } } } This is my code for removing a product from cart: removeFromCart(itemRemoved){ let account = JSON.parse(localStorage.getItem(‘user’)) === null ? ” : […]

Angular x Firebase, firebase wont output data in DOM, ‘GET request’

I have a realtime database in Firebase, and the POST request works, When I want to get the info from the database and GET it into the HTML file, it wont work and in the console its showing me this error: "Cannot find a differ supporting object ‘[object Object]’ of type ‘object’. NgFor only supports […]

Angular & Firebase Realtime-Database. How to get child knowing its id property but without knowing it’s parent node

My Database is like this I can get to cart part on my own and I can even delete the product from cart.. if I type in the auto generated id manually.. Honestly, I have been trying to do this for 2 days now. I researched every stackoverflow question related to firebase database but I […]

How to completely delete user account from admin panel using angular and AngularFireAuth

I am creating an admin panel, I have a mat table which is showing my delivery boys having email name mobile etc means their full details with edit and delete icon button. Okay Now I am trying to delete the delivery boy so delivery boy is being deleted from Realtime Database by clicking on delete […]

Duplicate array being returned from firebase after HTTP.get in Angular service

I am seeing a duplicate array in my response from a HTTP get from a Firebase realtime database in an Angular web-app. I have created a firebase realtime database with the following setup: Firebase data In my angular application I am performing a HTTP get to retrieve data from Firebase. fetchEventsAdmin2() { return this.http .get<bookableEvent[]>( […]

I can not insert and get data to firebase real-time database when I am trying to write and read data to firebase database. Error showing like this

Refused to apply style from ‘’ because its MIME type (‘text/html’) is not a supported stylesheet MIME type, and strict MIME checking is enabled. Access to XMLHttpRequest at ‘ ” from origin ‘http://localhost:4200’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: It does not have HTTP ok status. […]

Retrieve data from array of IDs firebase (Angular)

I currently building a recommendation system using firebase angular. in my .ts, after all calculation take place, all recommended product IDs saved in an array called var rankedIds = ["prod0003", "prod0001", "prod0004", "prod0002", "prod0005"]; basically to get all the raw data looked like this .ts: constructor(private dbsource: AngularFireDatabase){} getAllItem(): AngularFireList<Products>{ return this.dbsource.list(`products/`); } getItemRecommendation(){//need to […]

Setting up Firestore with Angular fire results in: NullInjectorError: R3InjectorError(HomePageModule)

I can without any problem set up Firebase Realtime database in a service according to the GitHub modular sample codes. I know it works because I can read, write and listen to data changes in the Firebase Realtimedatabase without any problem. But when I try to add also Firestore to the project suddenly my build […]

1 15

Still Have Questions?

Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us