【问题标题】:AngularFire2 QueryAngularFire2 查询
【发布时间】:2017-09-20 08:24:53
【问题描述】:

For the image click here: JSON Image 我得到了这样的 JSON,我试图只获得“naamKort”等于“NEC”的结果。

我目前得到了这个:

getData(onUpdate) {
        this.db.list('/sndata/wedstrijden', {
            query: {
                orderByChild: 'teamThuis'.'naamKort',
                equalTo: 'NEC',
            }
        }).subscribe((data) => {
            onUpdate(data);
            this.gamesObservable.emit(data);
        });
    }

但是orderByChild: 'teamThuis'.'naamKort', 不起作用。所以我不确定当值在不同的值内时如何准确地使用等于。如果我查询让我们说 'tijd' equalTo '20:30' 它工作正常。

【问题讨论】:

    标签: angular firebase ionic-framework angularfire angularfire2


    【解决方案1】:

    找到了。 显然我需要使用:

     orderByChild: 'teamThuis/naamKort',
    

    【讨论】:

      猜你喜欢
      • 2017-03-11
      • 1970-01-01
      • 2017-01-30
      • 2018-07-21
      • 2018-03-13
      • 2017-02-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多