不存在键的Angularfire查询

时间:2018-09-12 05:14:53

标签: angular firebase google-cloud-firestore angularfire2

我必须查询集合中的文档中不存在密钥的文档

我尝试了

this.dbCollectionService.userCollection.ref.where('socialUserId','==',typeof null).get().then(res => {
      res.forEach(
        documentSnapshot => {
          console.log('in');
          //this.selectedUser$ = this.firestore.doc(documentSnapshot.ref);
         console.log(documentSnapshot.data());
        });
    }).catch(err => {

    });

 this.dbCollectionService.userCollection.ref.where('socialUserId','==',typeof undefined).get().then(res => {
      res.forEach(
        documentSnapshot => {
          console.log('in');
          //this.selectedUser$ = this.firestore.doc(documentSnapshot.ref);
         console.log(documentSnapshot.data());
        });
    }).catch(err => {

    });

但是两者都不起作用

0 个答案:

没有答案