title: How to get value outside the $promise
body: <p>I had strucked in making use of $promise value outside the api call but I am getting as undefined. Please help me how can I get the value outside .</p>
  
  <pre><code>getPeople($scope.selectedId).fetch({
            }).$promise.then(
                function (value) {
                    $scope.peopledata = value.data[0];
                    console.info($scope.peopledata); // here I can get data
                },
                function (err) {
                });
  </code></pre>
  
  <p><code>console.info($scope.peopledata);</code> // but here I was getting undefined </p>
  
  <p>how can I get data outside?</p>