title: Retrieve user info from Firebase and display in app
body: <p>I have a Profile Page where I am trying to create a function, retrieveUserData, that will retrieve values from firebase, assign them to variables which I can then use to display in the html file. </p>
  
  <pre><code>import { Component, OnInit, ViewChild } from '@angular/core';
  import { IonicPage, NavController, NavParams } from 'ionic-angular';
  import { HomePage from '../../../pages/home/home';
  import { AngularFireDatabase } from 'angularfire2/database';
  import { Profile } from '../../../models/profile';
  import { AngularFireAuth } from 'angularfire2/auth';
  
  
  @Component({
    selector: 'page-profile',
    templateUrl: 'profile.html',
  })
  export class ProfilePage implements OnInit {
  
    name: string = "";
    hometown: string = "";
  
    constructor(private afDatabase: AngularFireDatabase, private afAuth: AngularFireAuth, public navCtrl: NavController, private navParams: NavParams) {
  
    }
  
    ngOnInit(){
  
    }
  
    onGoToHome(){
      this.navCtrl.push(HomePage)
    }
  
    retrieveUserData(){
      var userId = this.afAuth.app.auth().currentUser.uid;
  
  
    }
  
  }
  </code></pre>
  
  <p>I am trying to pull certain info from the firebase database to assign values to name and hometown and then use them in the html file. I have tried using the following examples from <a href="https://firebase.google.com/docs/database/web/read-and-write" rel="nofollow noreferrer">this</a> doc, but the syntax is not working for me.. None of the syntax is being recognized. I know this is super trivial. Can someone help me with a clear example of the proper way to grab this data and use it. The table in firebase is called "profile". </p>