title: Angularjs getting value of response using $resource
body: <p>I'm trying to get the response of a request using <code>$resource</code>, for example I have:</p>
  
  <pre><code>angular.module('app').factory('AuthResource', ['$resource', function($resource) {
      return {
          isAuthenticated : function() {
              return $resource('/api/v1/auth/authenticated').query();
          }
      }
  }]);
  </code></pre>
  
  <p>Then in my controller I'm calling this service and doing:</p>
  
  <pre><code>console.log(AuthResource.isAuthenticated());
  </code></pre>
  
  <p>This doesn't return the actual result, which is simply a single object <code>{'success' : 'true'}</code>.</p>
  
  <p>Instead it returns:</p>
  
  <pre><code>Resource {$resolved: false, $then: function, $get: function, $save: function, $query: function…}
  $resolved: true
  $then: function (callback, errback) {
  success: false
  __proto__: Resource
  </code></pre>
  
  <p>How do I go about getting the actual returned object? I'm not applying this to any models, just using the data to determine some routing.</p>
  
  <p>Thank you!</p>