簡體   English   中英

如何將 append 新數據存儲在 Firebase 的 Firestore 上的數組中? 節點,Ionic3,Angular,Javascript

[英]How to append new data to array stored on firebase's firestore? Node, Ionic3, Angular,Javascript

需要一些幫助。 我無法從firebase.firestore訪問arrayUnionFieldValue 我有存儲在 Firestore 上的地圖數組。 我需要 append 數據在同一數組中,索引增加,即使{merge:true}不起作用。 我正在使用離子 3。

firebase.firestore.FieldValue.arrayUnion - 在 arrayUnion 出現錯誤。

錯誤是:

Property 'arrayUnion' does not exist on type 'typeof FieldValue'

以防有人遇到同樣的問題。 arrayUnion 方法在 firebase v5.3.0 及以上版本中。 它還包括這么多的數組操作方法。 只需通過 npm firebase@latest 更新 firebase

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM