title: AngularFire2 getting UID and using in any page
body: <p>In Ionic(AngularFire2) application, for every page i need to get Firebase User UID, to get related data from Firebase database. For example, on Firebase there is a node('/users') and its key is FireBase Auth User UID. </p>
  
  <pre><code>  {
    "users" : {
      "LYW6i8sTbWauCvkXULIbszIWOdm1" : {
        "cellPhone" : "123321",
        "name" : "Name1",
        "userType" : "0"
      },
      "i4KSAzO2UhakowLKOZCa0ZeohRH3" : {
        "cellPhone" : "43343",
        "name" : "Name2",
        "userType" : "1"
      }
    }
  }
  </code></pre>
  
  <p>I am using observables to get the UID, for every page again and again. I think there will be lots of subscriber and everytime ionic application makes request to Firebase Auth Server to get user UID ? </p>
  
  <p>For example. </p>
  
  <pre><code>export class AccountProfilePage {
  
        user = {} as User
    constructor(public navCtrl: NavController, public navParams: NavParams, 
      private afDb:AngularFireDatabase, private afAuth:AngularFireAuth) {
    }
  
    updateProfile(){
        this.afAuth.authState.subscribe(authState=&gt;{
          this.afDb.object('users/'+authState.uid).update({
            cellPhone:this.user.cellPhone
          })
        })
    }
  }
  </code></pre>
  
  <p>Is it the correct way ?</p>