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
31
votes
3 answers

Using AngularFirestore Collection orderBy with snapShotChanges method

I have below code in an Angular application which is using AngularFire2. TypeScript: constructor(db: AngularFirestore) { this.booksCollectionRef = db.collection('books'); this.books =…
Nalaka526
  • 11,278
  • 21
  • 82
  • 116
31
votes
2 answers

How to assign an initial value to Subject RxJS observable?

I'm developing an Angular 2 app, I need make changeable the order of my columns in a List, clicking on the title (as data-table works) and I get an idea from Angularfire 2 documentation examples, here is my code: (grupos.component.ts) import {…
30
votes
4 answers

Property 'code' does not exist on type 'Error'

How can I access the Error.code property? I get a Typescript error because the property 'code' does not exist on type 'Error'. this.authCtrl.login(user, { provider: AuthProviders.Password, method: AuthMethods.Password }).then((authData) => { …
J-Yen
  • 637
  • 1
  • 7
  • 9
29
votes
3 answers

Access parent documents field in Firestore rules

I'm implementing a recipe book in Firestore where every user is able to see all the recipes all users created but only the original author of the recipe is allowed to edit or delete the recipe. Any user is also allowed to create a new recipe. My…
Payerl
  • 1,042
  • 2
  • 16
  • 33
25
votes
10 answers

Firestore: Add Custom Object to db

Good Morning, I tried adding a new created object from this class: export class Sponsor implements ISponsor { title: string; description?: string; creation: ICreation; constructor(title: string, description: string, author: string) { …
Coach
  • 521
  • 1
  • 5
  • 14
25
votes
4 answers

Firebase error messages in different languages?

Showing the Firebase error messages (error.message) in the view results in english error descriptions (e.g. for Authentication errors, if user credetials contain errors). How would you display the messages in different languages (best case: in the…
24
votes
6 answers

EXCEPTION: This browser is not supported or 3rd party cookies and data may be disabled

This error occurs when our users "Block third-party cookies and site data". To replicate the error, go to: Check your Chrome browser "Block third-party cookies and site data" reference in this guide Go to https://www.deeptent.com Click SIGN…
Jek
  • 5,546
  • 9
  • 37
  • 67
21
votes
8 answers

NullInjectorError: No provider for InjectionToken angularfire2.app.options! 2021

Okay I just started using angular firebase and I've been scratching my head for two days. Most of the tutorials out there are mostly for older versions of firebase this is the error that I am receiving when I inject my authentication service to the…
karthik sadanand
  • 219
  • 1
  • 2
  • 9
21
votes
3 answers

Error TS2344: Type 'T[K]' does not satisfy the constraint

I am having a weird issue with my angular application, I just added AngularFire to my project, however when I try to put it up, it displays the following error: ERROR in nodae_modules/@angular/fire/angularfire2.d.ts(37,49): error TS2344: Type…
HeyBaldur
  • 545
  • 1
  • 7
  • 16
21
votes
10 answers

Identifier 'required' is not defined. '__type' does not contain such a member

I need to declare this variable to type any? This shows up in my visual code editor in my HTML template. product-form.component.html
alex
  • 655
  • 1
  • 8
  • 19
21
votes
3 answers

Angular 2 AuthGuard + Firebase Auth

I'm trying to build an AuthGuard for Angular 2 routes using Firebase Auth. This is the AuthGuard Service: import { Injectable } from '@angular/core'; import { CanActivate, Router, ActivatedRouteSnapshot, …
cerealex
  • 1,649
  • 4
  • 17
  • 37
21
votes
2 answers

Accessing firebase.storage() with AngularFire2 (Angular2 rc.5)

I am trying to access firebase.storage() on my project, with: "@angular": "2.0.0-rc.5" "angularfire2": "^2.0.0-beta.3-pre2" "firebase": "^3.3.0" I found this solution, and created my .component.ts file with: import { Component } from…
Victor Locoman
  • 215
  • 1
  • 2
  • 7
20
votes
5 answers

ERROR in ./~/firebase/app/shared_promise.js

I'm trying to create an Angular 2 App with AngularFire2 I was following this guide. Everytime I try to import the AngularFireModule in my app module and then do AngularFireModule.initializeApp(config) in the imports I'm getting the following error…
bekamais
  • 203
  • 1
  • 2
  • 6
19
votes
3 answers

Firestore transaction with multiple get

I'm trying to run a transaction with a variable number of read operations. I put the read () operations before than update (). Reading the Firestore doc on https://cloud.google.com/firestore/docs/manage-data/transactions "A transaction consists of…
Ciro Sasso
  • 191
  • 1
  • 6
19
votes
8 answers

Using Firebase reauthenticate

I'll appreciate assistance with how to reauthenticate a user in Firebase. I wonder if it makes any sense adding all these great features if the documentation doesn't explain how to use it: Currently, this is what I'm trying, and it ain't working.…
KhoPhi
  • 9,660
  • 17
  • 77
  • 128