Questions tagged angularfire

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

Close the `loader` here if I need to use the Real-time feature as well as an `async` pipe on the template

Can you tell me how to close the loader here if I need to use the Real-time feature as well as an async pipe on the template? Since it has a real-time feature it doesn’t work with finalize operator i.e. never completes. So any clue here, please. component.ts private getAlerts(loader: HTMLIonLoadingElement): void { this.alertsChanged$ = […]

test cases for angularFire multiple time App initialization issues

I am writing test cases for my Angular-Ionic PWA. with latest version of AngularFire that is "@angular/fire": "^7.0.4", Component1.spec.ts import { provideFirebaseApp, initializeApp } from ‘@angular/fire/app’; import { getFunctions, provideFunctions } from ‘@angular/fire/functions’; import { getFirestore, provideFirestore, enableMultiTabIndexedDbPersistence } from ‘@angular/fire/firestore’; import { getDatabase, provideDatabase } from ‘@angular/fire/database’; import { getStorage, provideStorage } from ‘@angular/fire/storage’; […]

How to get a list of files from FireBase Storage using AngularFire

I’ve got an Angular 12 app that is using Firebase storage to store some files in a directory. I implemented the integration with Firebase using the AngularFire solution. The docs on how to use the AngularFire storage functions don’t seem to include how to list all files in a directory. There are some docs on […]

Argument of type ‘unknown[]’ is not assignable to parameter of type > ‘OperatorFunction

component.ts initialize() method says Argument of type ‘unknown[]’ is not assignable to parameter of type ‘OperatorFunction<unknown[], unknown>’. Type ‘unknown[]’ provides no match for the signature ‘(source: Observable<unknown[]>): Observable’ alertsChanged$: Observable<AlertModel[]>; private initialize(): void { this.alertsChanged$ = this.alertsService.getAlerts().pipe( map((res) => res), // here it returns the above error tap((res) => { this.setDataForFilters(res); //Argument of type ‘unknown’ […]

FIREBASE WARNING: Using an unspecified index. Your data will be downloaded and filtered on the client

@firebase/database: FIREBASE WARNING: Using an unspecified index. Your data will be downloaded and filtered on the client. Consider adding ".indexOn": "status" at /groups/test/leadPropertyInformations to your security rules for better performance. Firebase RTD Rules { "rules": { ".read": "auth != null", ".write": "auth != null", "groups": { ".indexOn": ["leadPropertyInformations/status"] } } } JSON Tree Note: You […]

Load testing Angular app with Firebase on BlazeMeter throws lots of ‘Unknown SID’ errors

We’ve built an Angular app using Ionic Capacitor, which uses Firestore as its backend. It’s pretty stable and runs nicely on the browser and on the device with no issues. We decided to load test it. So we used BlazeMeter and set up a test for 20 instances doing something fairly simple, but we consistently […]

handle snapshotChanges in firestore collection using AngularFire

I have running my application perfectly with "@angular/fire": "^6.1.5", "@angular/core": "~12.0.2" and it was like Service.ts getInboxCollection(userId: string) { return this.firestore.collection(`/user/${userId}/inbox/`).snapshotChanges().pipe( map( changes => { return changes.map( a => { const data: any = a.payload.doc.data(); data.id = a.payload.doc[‘id’]; return data; }); }) ); } Component.ts this.service.getInboxCollection(this.userId).subscribe((res: any) => { console.log(res); } Now I have moved […]

AngularFireAuth and Ionic 5 login issue

I’ve been working on a new app for iOS and Android. I’m developping it on Angular 12 using Ionic 5, Capacitor and Firebase 9. While I’m used to setting up auth pages (login/register/pwd reset) with AngularFireAuth, I’m having trouble doing the same with Ionic and Capacitor. My pages, services and guards are working fine on […]

Batch update works as set operation

I need to do a batch update with Firebase’s real-time database. I have done it like so: This is working fine. But I need an update only for the 2nd operation. At this moment it works as set operation. Any clue? const updates = {}; //batch operation // this is working fine and I need […]

@firebase/firestore: Firestore (9.0.0): Could not reach Cloud Firestore backend (permission denied)

I have setup local emulatare for Firebase (Firestore, Functions and Auth). Auth seems to be working as I am able to create a user which shows up as it would: However, the Firstore remains empty, even though I am writing the user-data to it: private async updateUserData(user: User | null) { if (!user) { throw […]

By Stefan Falk
Published
Categorized as angular, angularfire, firebase Tagged , ,
1 18

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
faq