angular / angular/angularfire

README.md misused variable

未關閉
#3,344 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
TypeScript
星號
7.8k
分支
2.2k
平均合併
22 小時 28 分鐘
30 天內合併 PR
6

描述

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

貢獻指南

開啟貢獻指南

研究方向

開啟 README.md,檢查 issue 中連結的 TypeScript 範例。比較宣告的 itemCollection 與傳遞給 collectionData 的引數,然後更新範例,使其使用已宣告的 collection,並確認顯示的程式碼片段一致。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
angular, firebase, typescript
領域
documentation
Issue 類型
文件
難度
1/5
預估耗時
1 小時以內
活躍度
停滯
描述清晰度
描述清楚
新手友好度
55/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。