angular / angular/angularfire

README.md misused variable

Open
#3,344 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
7.8k
Forks
2.2k
Avg merge
22h 28m
Merged PRs (30d)
6

Description

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);
}
```

Contributor guide

Open the contributing guide

Research direction

Open README.md and inspect the TypeScript example linked in the issue. Compare the declared itemCollection with the argument passed to collectionData, then update the example so the declared collection is used and verify the displayed snippet is consistent.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, firebase, typescript
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.