Questions tagged [angularfire2]

AngularFire is the officially supported Angular binding for Firebase. The combination of Angular and Firebase provides a three-way data binding between your HTML, your JavaScript, and the Firebase database. This tag is for binding with Angular2+. Don't use this tag for binding with AngularJS.

AngularFire2 is the officially supported Angular2+ binding library for Firebase. The combination of Angular2 and Firebase provides a three-way data binding between your views, components and the Firebase database. There are Firebase auth features available besides the database.

3107 questions
18
votes
8 answers

"ERROR TypeError: Object(...) is not a function" using AngularFirestore and firebase

I want to use firebase and angularfire2 in my app, first of all, I installed them, and for the declarations: in environment.ts export const environment = { production: false, firebase: { apiKey: 'sfsdfdsff', authDomain: 'sfsdfdf', …
Hazem HASAN
  • 1,598
  • 2
  • 21
  • 38
18
votes
4 answers

How to get firestore timestamp

I'm trying to get the timestamp of a document that I created in firestore, but what I get is this: myService.ts getDomiciliarios() { this.domiciliarios = this.afs.collection('domiciliarios').snapshotChanges().map(actions => { return actions.map(a…
18
votes
3 answers

What is snapshotchanges in firestore

this function is called by the constructor. can someone explain in depth to me what it does? initializeItems(){ this.travelList$ = this.plsdala.getTravelList() .snapshotChanges() .map( changes => { return changes.map(c=>({ key:…
Jennica
  • 327
  • 1
  • 3
  • 15
18
votes
1 answer

ValueChanges & SnapshotChanges, don't get the full lists anymore with Firebase AngularFire2

We've been having some serious problems with the recent changes to how AngularFire treats objects/lists and referencing the objects throughout our app. The primary thing is how the old AngularFireObject & AngularFireList worked compared to the new…
Dennis Smolek
  • 8,480
  • 7
  • 30
  • 39
18
votes
3 answers

How to mock AngularFire 2 service in unit test?

I'm trying to set up unit tests for a sample Angular 2 app using AngularFire 2 auth, the component is fairly simple: import { Component } from '@angular/core'; import { AngularFire, AuthProviders } from 'angularfire2'; @Component({ moduleId:…
Javier Villanueva
  • 3,886
  • 13
  • 48
  • 80
17
votes
1 answer

Display duplicate events after update firestore data, but the data itself in firestore isn't duplicated

I have a web application(Angular) and mobile application(Ionic). Both of them share the same Firestore data. Use web application update existing data but the ionic app shows duplicate items(the duplicates will be gone after restart the mobile app),…
Haifeng Zhang
  • 30,077
  • 19
  • 81
  • 125
17
votes
4 answers

Uncaught (in promise): Error: No provider for AngularFireAuth

We are tried login with google authentication using (Firebase/ionic2/angularjs2).Our code import { Component } from '@angular/core'; import { NavController } from 'ionic-angular'; import { Observable } from 'rxjs/Observable'; import {…
17
votes
2 answers

Angular 2 Firebase Observable to promise doesn't return anything

I'm currently working on an Angular 2 project with AngularFire2 and I'm trying to convert a FirebaseListObservable to a Promise. I know that it doesn't make much sense since Observables are more useful but this function will be part of another…
Leonidas
  • 195
  • 1
  • 5
16
votes
4 answers

How to know whether the Register Email is verified or not in Firebase?

onSubmit(formData) { if(formData.valid) { console.log(formData.value); this.af.auth.createUser({ email: formData.value.email, password: formData.value.password }).then( authState => { authState.auth.sendEmailVerification(); …
pyy
  • 915
  • 3
  • 9
  • 25
16
votes
4 answers

Display loading while using Observable with Async pipe in template

Situation: I am using FirebaseObjectObservable to populate my Ionic 2 (rc0) template. Template code:

{{(course | async)?.description}}


Learning Objectives

15
votes
2 answers

Firebase Realtime Database currently gives TRIGGER_PAYLOAD_TOO_LARGE error

Since this morning, our Firebase application has a problem when writing data to the Realtime Database instance. Even the simplest task, such as adding one key-value pair to an object triggers Error: TRIGGER_PAYLOAD_TOO_LARGE: This request would…
Niek Oost
  • 628
  • 5
  • 15
15
votes
8 answers

How to use snapshotChanges() method to get both key value and filter the data?

I'm working on an Angular Firebase Project, where I need to filter my database as well get the key values. Currently I'm using valueChanges() method in my service code (inside getUnreadBooks and getFavoriteBooks methods, as shown below) to get the…
15
votes
2 answers

Firestore: Passing angularfire2 async data as Ionic 3 navParams not working

cities: Observable; this.cities = this.fsProvider.collection('cities').map(cities => { return cities.map(city => { city.country = this.fsProvider.doc(`countries/${city.country_id}`); return city; }); }); city includes…
coturiv
  • 2,880
  • 22
  • 39
15
votes
3 answers

/angularfire2/index has no exported member 'AngularFire'

Can't fix this problem: app.component.ts import { AngularFire, AuthProviders, AuthMethods } from 'angularfire2'; /angularfire2/index has no exported member 'AngularFire', /angularfire2/index has no exported member…
Katya Katerinaa
  • 153
  • 1
  • 1
  • 4
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…