Angular 无法从firebase实时数据库中获取密钥的值 first.Component.html 观景区 second.component.html {{it.alias} {{it.area} {{it.price}}

Angular 无法从firebase实时数据库中获取密钥的值 first.Component.html 观景区 second.component.html {{it.alias} {{it.area} {{it.price}},angular,firebase,angularfire2,Angular,Firebase,Angularfire2,在plats/bigfork/lots中,bigfork是lots的父键,但我还有其他键,它们包含与具有相同数据的lots相同的子键。所以我想做一个动态的i'd来代替bigfork,这样我就可以访问我点击的特定i'd的特定按钮的数据 第二部分 Firebase数据库 您需要使用查询: this.itemRef = db.list('/plats', ref => ref.orderByChild('lots').equalTo('lots')) 通过这种方式,您可以使用child的值来获

在plats/bigfork/lots中,bigfork是lots的父键,但我还有其他键,它们包含与具有相同数据的lots相同的子键。所以我想做一个动态的i'd来代替bigfork,这样我就可以访问我点击的特定i'd的特定按钮的数据

第二部分 Firebase数据库


您需要使用查询:

this.itemRef = db.list('/plats', ref => ref.orderByChild('lots').equalTo('lots'))

通过这种方式,您可以使用child的值来获取数据库中的不同键

您需要使用查询:

this.itemRef = db.list('/plats', ref => ref.orderByChild('lots').equalTo('lots'))
通过这种方式,您可以使用child的值来获取数据库中的不同键

this.itemRef = db.list('/plats', ref => ref.orderByChild('lots').equalTo('lots'))