angular / angular/angularfire

README.md misused variable

Offen
#3,344 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
TypeScript
Sterne
7.8k
Forks
2.2k
Ø Merge
22 Std. 28 Min.
Gemergte PRs (30 T.)
6

Beschreibung

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](https://github.com/angular/angularfire/issues/3343)
### Expected behavior
The declared retrieved collection `itemCollection` is to be used by passing it into the `collectionData` method as a parameter.
``` typescript
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.
``` typescript
constructor() {
const itemCollection = collection(this.firestore, 'items');
this.item$ = collectionData(collection);
}
```

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Öffne README.md und untersuche das im Issue verlinkte TypeScript-Beispiel. Vergleiche die deklarierte itemCollection mit dem an collectionData übergebenen Argument, aktualisiere dann das Beispiel so, dass die deklarierte Collection verwendet wird, und verifiziere, dass das angezeigte Snippet konsistent ist.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
angular, firebase, typescript
Bereich
documentation
Issue-Typ
Dokumentation
Schwierigkeit
1/5
Geschätzter Aufwand
Unter einer Stunde
Aktivitätsstatus
Veraltet
Klarheit
Klar beschrieben
Anfängerfreundlichkeit
55/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.