title: Angularjs :why controller can not access object properties from service?I really confused
body: <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>angular.module('voteApp').factory('VoteFty', function (VoteRsc, VoteStatisticRsc) {
  
      var data = {
          vote: {}
      };
  
      var view = function () {
  
          VoteStatisticRsc.get({id: 1}, function (resp) {
              data.vote = resp;
          })
      };
  
      var vote = function (params) {
  
          VoteRsc.update({id: 1, index: params}, function (resp) {
              alert('ok!');
          })
      };
  
      view();
  
      return {
          data: data,
          vote: vote,
          view: view
      }
  });
  
  angular.module('voteApp').controller('VoteCtrl', function ($scope, VoteFty) {
    
      console.log(VoteFty.data);  // Object{vote:..}
      console.log(VoteFty.data.vote); // Object{}
  }
                                       
                                       </code></pre>
  </div>
  </div>
  
  In the console VoteFty.data display it has vote property and its value is absolutely correct,but VoteFty.data.vote is null,that is really strange.</p>
  
  <p>why VoteFty.data.vote is null?I really cant not understand,please help me figure out it,thank you!</p>