我正在使用angularfire2从firestore添加和获取数据,并且我保持读写开放。问题是我能够写入数据库,但我在获取数据时没有收到错误:
Exception: TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them at Function.remoteFunction
这是我正在使用的代码
clientsCollection:AngularFirestoreCollection<UserLogs>;
clientDocs:AngularFirestoreDocument<UserLogs>;
clients:Observable<UserLogs[]>;
client:Observable<UserLogs>
constructor(private afs : AngularFirestore) {
this.clientsCollection = afs.collection<UserLogs>('logindb');
this.clients=this.clientsCollection.valueChanges();
console.log(this.clients);
}
newClient(client:UserLogs)
{
this.clientsCollection.add(client).catch(err =>{
console.log(err);
});
}