Questions tagged [angularfire]

AngularFire is an officially supported AngularJS binding for Firebase which is a cloud database designed to power real-time, collaborative applications. So you don't need servers to build your Angular app.

AngularFire is an officially supported AngularJS binding for Firebase. Firebase is a cloud database designed to power real-time, collaborative applications. So you don't need servers to build your Angular app.

The bindings let you associate a Firebase URL with a model (or set of models), and they will be transparently kept in sync across all clients currently using your app.

The 2-way data binding offered by AngularJS works as normal, except that the changes are also sent to all other clients instead of just a server.

2756 questions
0
votes
1 answer

Show the updated value of a created array after angular firestore subscription

I want to access the content of a variable I filled with an array of an firebase subscription, my problem is I cant/dont know how to access/get the value which I created inside the subscription. it feels like I cant use the created value outsite of…
modi
  • 3
  • 3
0
votes
1 answer

AngularFire Database won't update from button click

I have an Angular Material data table with CRUD operations as buttons on each row. Unfortunately the buttons aren't working. If I call the toggleActiveCourse or deleteCourse functions in ngOnInit, the data is updated as expected, but if I call…
wingej0
  • 25
  • 1
  • 7
0
votes
0 answers

Angular get wrong path of firebase-messaging-sw.js on production

I'm using Firebase to get message from backend. It works perfectly on my localhost. But in production, my web served at .../XXXX and firebase-messaging-sw.js located at .../XXXX/firebase-messaging-sw.js but Angular always load…
Duc
  • 13
  • 3
0
votes
1 answer

how to get changes in a firestore document array of object

I have a collection called chats, I want to listen on the document for changes in the msg while also returning the data from the msg field, I have come up with a query but I am not getting the result I want. below is the code. …
0
votes
1 answer

Getting "Invalid doc ref. Doc ref must have an even number of segments," Error when writing batch doc to Firebase Firestore V9 Angularfire

I tried using writeBatch() to write documents in subcollections. I followed the Fireabase Documentation and came up with the script: const batch = writeBatch(this.db); const ref = doc(this.db,…
0
votes
1 answer

how I can return data as success message when I set data in firebase?

I try to return orderId after I set this order in Realtime database using angularfirestore what I should use after set() to return the orderId after sucess add this order to database my order object is this: const orderObj: Order = { payMethod:…
0
votes
0 answers

How to retrieve AccessToken for files in Firebase Storage

I am currently using firebase storage to upload images for a final year project. I am using Angular, Ionic & Capacitor for this project. I can upload images with no issues (quite proud of it!) but I am unable to retrieve the images when I make a…
0
votes
1 answer

hasCustomClaims redirects to blank page

I am using hasCustomClaim to guard a route from non admin users. const adminOnly = () => hasCustomClaim('admin'); The problem here is after a simple user tries to visit the forbidden path, he get redirected to localhost:4200 even if I have already…
Mohammed
  • 171
  • 2
  • 11
0
votes
1 answer

Angular Fire 7 canActivate

I'm initializing a new app with angular 13 and angular fire 7. when using AngularFireAuthGuard I got nullInjetor error import { AngularFireAuthGuard } from '@angular/fire/compat/auth-guard'; I change it to AuthGuard and every thing works…
Ali Maher
  • 251
  • 2
  • 8
0
votes
1 answer

Get Data from a reference field in firestore and return to array

I have a order data that has user data and hotel data as references. Now i have the below code to get data this.orderService.getOrders().subscribe(result => { this.orders = result.map(e => { return { id: e.payload.doc.id, …
0
votes
2 answers

Angular Change Detection not happening on Lazy loaded pages on initial navigation

I am currently using Angular 13 and Ionic v6 with AngularFire v7. After logging in to the application with firebase authentication. I navigate the user to the lazy-loaded home page. In the background, I retrieve some required company data and share…
0
votes
0 answers

Angular Mat Chips using AngularFire

I'm trying to follow the Mat Chips documentation here; however Instead of hardcoding the values, I'm trying to connect it thru my firestore database via angularfire. firestore database: however I'm kinda lost to the part wherein how to connect it…
0
votes
1 answer

Firebase storage percentChanges() method returns NaN

I am trying to build a firebase storage service from an angular client, which will upload a user profile image and return uploadProgress$ and DdownloadUrl$ observables. uploadProgress$ is a Observable which will store the percentChanges() value…
0
votes
1 answer

My promise returns the same value every time it's called despite having different data?

So first the getCart function is called in b-navbar.component.ts: export class BNavbarComponent implements OnInit{ appUser: any; cart$ : Observable; constructor(private auth : AuthService, private shoppingCartService :…
0
votes
1 answer

Firebase Auth & AngularFire Not Working on IOS Device

I created an Ionic 5 + Capacitor + Firebase project and added the latest version of AngularFire to it. Everything works perfectly on Desktop but when I launch on my iPhone, there is an error (Well, there is no error but the redirection of my first…