HI! The question seems irrelevant to ionic 2, but i would appreciate if somebody who work with firebase can give me a hand. I am trying to read the value from firebase and assign it to a global variable but it didn’t work.
public points: any;
readPoints(): any{
this.userProfile.child(this.user.uid).once('value').then((snapshot) =>{
this.points = snapshot.val().user_points;
});
}
any way to assign value from firebase to variable?