2017-10-05 89 views
1

您好我正在使用Firebase和角色4在這個新東西是firestore,我嘗試更新其中一個文件,但我有這個錯誤。更新Firebase Cloud Firestore中的對象使用Angular 4

enter image description here

這是我

及部件

enter image description here

如果我刪除我的意思是,如果我這樣做了接口,noteDoc:AngularFirestoreDocument;而不是noteDoc:AngularFirestoreDocument; 錯誤去,但我更喜歡使用界面中的一些人可以幫助我感謝

回答

0

我想你可以嘗試將所有非空的屬性提供值:

this.noteDoc.update({ 
    content: this.newData, 
    hearts: this.noteDoc.hearts 
} 

或使心可爲空的每個ID。

0

我認爲這實際上可能是有AngularFire的錯誤,我做一個temporaly解決方案修改接口這樣

interface User { 
name?: String; 
email?: String; 
id?: any; 
} 

我希望這有助於有人感謝

相關問題