title: How to get `$promise.then` value by return in the `$resource`?
body: <p>From one of the service, I am <code>retuning</code> a back-end output. I am getting values, but how to get the result values from the returned object?</p>
  
  <p>here is my code :</p>
  
  <pre><code>var queryConractorInfo = function ( server, contractorParams ) {
  
              return server.contractorInfo.get(contractorParams)
                    .$promise.then(function ( contractorInfo ) {
  
                      return contractorInfo;
  
              })
  
  }
  </code></pre>
  
  <p>here is my call :</p>
  
  <pre><code>console.log( queryConractorInfo( server, contractorParams) );
  </code></pre>
  
  <p>here is the output I am getting :</p>
  
  <pre><code>{
    "$$state": {
      "status": 1,
      "value": { // i want to get this from returned object.
        "ActualPercentage": "33.5",
        "AllWeeks": [
          "/Date(1446930000000+0300)/",
          "/Date(1446498000000+0300)/",
          "/Date(1439154000000+0300)/",
          "/Date(1438635600000+0300)/",
          "/Date(1436043600000+0300)/",
          "/Date(1431550800000+0300)/",
          "/Date(1389733200000+0300)/",
          "/Date(1332277200000+0300)/"
        ]
  }
  }
  }
  </code></pre>
  
  <p>I tried like this:</p>
  
  <pre><code>var queryConractorInfo = function ( server, contractorParams ) {
  
              return server.contractorInfo.get(contractorParams)
                    .$promise.then(function ( contractorInfo ) {
  
                      return contractorInfo.promise;
                      //adding promise but not working
  
              })
  
  }
  </code></pre>