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
20
votes
2 answers

How to use Google Analytics with AngularFire?

I have an Angular app build with AngularFire and hosted on Firebase. How should I be using Analytics SDK to set the user ID, track page loads and log custom events?
20
votes
3 answers

Using Firebase in production

I was developing a food ordering app using Ionic & Firebase for a local restaurant . Having limited knowledge in any backend language , and lazy to spend time on that , I was thinking of using Firebase to store the data as it has everything that I…
32teeths
  • 1,469
  • 1
  • 15
  • 32
19
votes
1 answer

Finding correct Firebase Auth id_token on $onAuthStateChanged

I am currently using Angular 1.5.8, Firebase 3.3.0, and AngularFire 2.0.2. When I call $firebaseAuth.$signInWithPopup, the promise returns with a firebase user that includes firebase.user.idToken, but when I call $onAuthStateChanged, firebase user…
Luke Schlangen
  • 3,722
  • 4
  • 34
  • 69
18
votes
2 answers

Firebase Synchronous XMLHttpRequest Deprecated

The ping service from Firebase is using Synchronous XMLHttpRequest which was reported by Google Chrome as follows: Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For…
Mohammad
  • 209
  • 2
  • 5
18
votes
2 answers

$rootScope.currentUser is null on refresh

I was able to get the firebaseSimpleLogin working and storing the current user in the rootScope. When I goto another page and come back to the feed page everything loads, but when I refresh $rootScope.currentUser is null. Has anyone else had this…
Markus Gray
  • 527
  • 1
  • 6
  • 16
17
votes
1 answer

Angular Firebase app crashes after 20 hours with +1 gigabyte of memory allocation

I found that using the AngularFireAuthModule from '@angular/fire/auth'; causes a memory leak that crashes the browser after 20 hours. Version: I use the latest version updated today using ncu -u for all packages. Angular Fire: "@angular/fire":…
TSR
  • 17,242
  • 27
  • 93
  • 197
17
votes
5 answers

Delete Firebase anonymous users after a while

I am using anonymous auth to allow my users to use the app without logging in. However, Firebase seems to persist these anonymous user IDs indefinitely. Is there a way to automatically purge these or set some sort of expiration rule? I don't want…
rex
  • 3,133
  • 6
  • 35
  • 62
16
votes
2 answers

Firebase, login by same email different provider

I want my users can login using many different provider but they will get same result if they use only one email address. For example, in stackoverflow I can login by Facebook, Google ... but I still can keep my profile as well as my posts ... In…
15
votes
2 answers

how to filter an Observable array?

My method returns an Observable array from Firebase. I have decided to filter the data in the client rather than in the server. My problem is that I want to get only the data if the attribute "attending = true". Any help or other approach is highly…
15
votes
4 answers

How to get currently logged in auth state/user from angularfire2

I have an ionic2 app and am using Firebase and angularFire2. I'd like to get the current authentication state and current auth object/user from firebase using angularFire2. Here's what's working so far - I can authenticate the user and subscribe to…
MonkeyBonkey
  • 46,433
  • 78
  • 254
  • 460
14
votes
1 answer

Error: Package path ./compat is not exported from package

Note: I think I was able to to reproduce this (see stackblitz example). The error there is printed in the console as "INTERNAL ASSERTION FAILED: Expected a class definition". This is different to what I get locally but to me this looks like the…
Stefan Falk
  • 23,898
  • 50
  • 191
  • 378
14
votes
7 answers

export 'firestore' (imported as 'firebase') was not found in 'firebase' after upgrading to firebase js sdk v8

I have upgraded the firebase JS SDK from v7 to v8.0.0 and I am importing firebase like so. import * as firebase from 'firebase'; Accessing any of the following causes the error…
MadMac
  • 4,048
  • 6
  • 32
  • 69
14
votes
2 answers

AngularFireAuth emulator login is lost on page reload

My Angular project successfully uses the AngularFireAuth injectable from @angular/fire to connect to a local Firebase authentication emulator. I used these sources as references for my implementation: Firebase Docs: Instrument your app to talk to…
14
votes
4 answers

Assistance With TS2570 Error: Property 'sendEmailVerification' does not exist on type 'Promise'. Did you forget to use 'await'?

I am trying to set up Firebase on my Ionic Angular project. I am using the linked tutorial https://www.positronx.io/ionic-firebase-authentication-tutorial-with-examples/ to do this. I keep getting a TS2570 error: Property 'sendEmailVerification'…
user12921135
14
votes
6 answers

AngularFire error only when ng serve --prod

I have an Angular 8 app, using npm package Angular Firebase (https://github.com/angular/angularfire2) and when I build the app with the Angular CLI command ng build --prod and deploy to my hosting I get the following Chrome Browser Console…
Brian Ogden
  • 18,439
  • 10
  • 97
  • 176