node.js - Ionic/angularfire2/firebase - How do I get a specific child-node, from my firebase database? -
i'm using ionic , firebase, angularfire2 package build application.
i have issue retrieving information 1 child node, under unique id key. databse structered this:
-users
 --- -krkjqbdpc0z4cdn9uwt (unique id)
 --- --- email: "mail@mail.dk"
 --- --- birth: "1990"
 --- --- gender: "female"
 --- -krkjj8qgbbl-mdgogaf (another unique id)  
my code retrieving data looks this:
userpath: firebaselistobservable<any>; userid: any;    constructor(    public navctrl: navcontroller,    public navparams: navparams,    public angfire: angularfiredatabase,    public currentid : globaluseridprovider) {     this.userid = this.currentid.getglobaluserid();   this.userpath = this.angfire.list('/users/'+this.userid);    this.userpath.subscribe(snapshots => {    console.log(snapshots);   }) i have console logged userid make sure works, does, keep getting entire databse, of unique id's instead of one.
 weirdest part is, if click (to previous page, id set), , go forward page, works, , gives me information of unique id.
 can't figue out issue is, since userid works fine, , therefore should set correct path me subscribe on.  
please help! thank you.
 
 
Comments
Post a Comment