3,123 questions
9
votes
0
answers
1k
views
RuntimeError: NG0203: The `EnvironmentInjector` token injection failed. Migrating Angular 18 -> 19
I updated Angular from 18 to 19 with ng update @angular/core@19 @angular/cli@19, and manually updated "@angular/core": "^18.0.5" to "@angular/fire": "19.0.0".
@...
2
votes
1
answer
62
views
Firestore with AngularFire Pagination with startAfter : Hn is not a function or its return value is not iterable
I am working on an Angular application using the following versions:
@angular/fire: 7.5.0
@angular/core: 15.2.0
firebase: 9.17.1
Node.js: v20.11.1
I am implementing pagination for a Firestore query ...
1
vote
1
answer
50
views
NullInjectError in HomeComponent
I'm getting this error when starting the HomeComponent. The configuration is specified inside the environment file and is correct. Could I be injecting something incorrectly? Do I need to inject ...
2
votes
1
answer
94
views
AngularFire: get the isNewUser flag;
I need to get hold of the 'additionalUserInfo.isNewUser'.
import { User, getAdditionalUserInfo, getAuth, user, UserCredential } from '@angular/fire/auth';
afAuth = getAuth();
user$: Observable&...
1
vote
1
answer
144
views
Angularfire: how to Initialize the config dynamically?
app.config.ts file:
import { provideFirebaseApp, initializeApp } from '@angular/fire/app';
import { getAnalytics, provideAnalytics } from '@angular/fire/analytics';
export const appConfig: ...
2
votes
1
answer
115
views
Returning a signal in Angular Fire Functions
I'm trying to integrate Angular 18 with Firebase Cloud Functions to read a MongoDB database. I'm using signals because I understand this is the latest way to do this, but I get a type error.
This is ...
3
votes
1
answer
128
views
Firebase docData stream emits identical object values multiple times in a row
This is my code:
import { doc, docData } from '@angular/fire/firestore';
const gameDocRef = doc(this.firestore, 'game', game.id);
const game$ = docData(gameDocRef, { idField: 'id' })
Somehow the ...
0
votes
1
answer
191
views
Mocking AngularFireAuth for angular service unit testing
I created a service to handle all of my authentication calls to angularFireAuth, but the basic toBeTruthy assertion is hitting an injector error for angularFireAuth. I solved this for several other ...
0
votes
0
answers
41
views
How can I query a few levels deep in AngularFIre?
I am trying to get some data from a database where I want only objects that contains a certain key/value pair to be returned.
I am using RTDB with Angular Fire.
Lets say this is the data
{
"times&...
1
vote
1
answer
222
views
AngularFire read a Firestore document only once
Using Angular 17 and AngularFire 17, what is the best method for simply getting document data, just once, from a Firestore record?
I can get it with the following but this seems overkill as I assume I ...
0
votes
3
answers
187
views
how can i use serverTimestamp in angular/Fire in the compat mode
I have tried
import firebase from 'firebase/compat/app';
import 'firebase/compat/firestore';
const firestore = firebase.firestore;
this.form = this.builder.group({
items:[data.items, null],
...
1
vote
0
answers
195
views
angular/fire installation script returns Invalid project id
I am trying to create an authentication page for firebase login. Following the documentation for the @angular/fire package, I created an angular project with ng new angular_fbauth. Then I ran ng add @...
0
votes
1
answer
67
views
FirebaseError: [code=permission-denied]: Missing or insufficient permissions. even if firestore rules read and write are permitted - Angular-Fire
i've got this problem when calling firestore function from angular fire.
When i'm succesfully authenticated, i'm fetching to firestore the current user document id for additional data associated with ...
1
vote
1
answer
70
views
Why is it so complex to convert AngularFire Observable to Array?
I am calling data from Firebase RTDB and that data is in an Observable. The issue I am having here is that, in my .TS file i would like to access the content of the Observable, that thought seems to ...
7
votes
5
answers
16k
views
Upgraded angular versions and now getting error: "The AppComponent component is not marked as standalone"
I recently updated angular because Angular Fire bugs were fixed in a much newer version. My previous version was before the "standalone" changes. As a result, I'm getting this error in the ...