title: Object property is undefined in AngularJS
body: <p>The following works for me:</p>
  
  <p>HTML:    </p>
  
  <pre><code>{{user.uid}}
  </code></pre>
  
  <p>JS:</p>
  
  <pre><code>"use strict";
  
  app.controller('Ctrl', function($scope, Auth) {
  
  $scope.user = Auth.user;
  });
  </code></pre>
  
  <p>but</p>
  
  <p>HTML:</p>
  
  <pre><code>{{uid}}
  </code></pre>
  
  <p>JS:</p>
  
  <pre><code>app.controller('Ctrl', function($scope, Auth) {
   $scope.uid = Auth.user.uid;
  });
  </code></pre>
  
  <p>doesn't work, and it's because Auth.user.uid is undefined! Why is this happening? Why can we call attributes within the view but not within the controller? What should I do if i want to call an attribute within the controller?</p>