2017-10-05 58 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; 
} 

我希望这有助于有人感谢

相关问题