title: Angularjs should I $rootScope data returned from firebase?
body: <p>Let say I want to retrieve user info from firebase,
  and this user info will be displayed in several routes/controllers</p>
  
  <p>Should I <code>$rootScope</code> the returned user info?</p>
  
  <p><strong>or</strong> </p>
  
  <p>Call below code in each controller?</p>
  
  <pre><code>firebaseAuth.firebaseRef.child('/people/' + user.id).on('value', function(snapshot) {
    $scope.user = snapshot.val();
  })
  </code></pre>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I have a following service with a <code>getUserInfo()</code> function then what is the best way
  to use it in several controllers?
  calling <code>firebaseAuth.getUserInfo().then()</code> in each controller?
  If the user data I have to use in several controller. Why don't I set it <code>$rootScope</code>?
  So I don't need to call it again and again in different controllers.</p>
  
  <pre><code>myapp.service('firebaseAuth', ['$rootScope', 'angularFire', function($rootScope, angularFire) {
    this.firebaseRef = new Firebase("https://test.firebaseio.com");
    this.getUserInfo = function(id) {
      var userRef = this.firebaseRef.child('/human/' + id);
      var promise = angularFire(userRef, $rootScope, 'user', {});
      return promise;
    }
  });
  </code></pre>