angular / angularfire

Angular + Firebase = ❤️
https://firebaseopensource.com/projects/angular/angularfire2
MIT License
7.66k stars 2.19k forks source link

README.md misused variable #3344

Open KONRADS098 opened 1 year ago

KONRADS098 commented 1 year ago

Head to https://github.com/angular/angularfire/blob/master/README.md

Version info

Angular: N/A Firebase: N/A AngularFire: N/A Other (e.g. Ionic/Cordova, Node, browser, operating system): N/A

How to reproduce these conditions

Failing test unit, Stackblitz demonstrating the problem N/A Steps to set up and reproduce N/A Sample data and security rules N/A

Debug output

Errors in the JavaScript console N/A Output from firebase.database().enableLogging(true); N/A Screenshots N/A

Related Issues

#3343

Expected behavior

The declared retrieved collection itemCollection is to be used by passing it into the collectionData method as a parameter.

constructor() {
    const itemCollection = collection(this.firestore, 'items');
    this.item$ = collectionData(itemCollection);
}

Actual behavior

The declared retrieved collection itemCollection is not being used, instead an unexisting collection collection is being used.

constructor() {
    const itemCollection = collection(this.firestore, 'items');
    this.item$ = collectionData(collection);
}
KONRADS098 commented 1 year ago

Fixed!