title: AngularJS $resource class vs. instance methods
body: <p>I define a factory for "Dashboard":</p>
  
  <pre><code>myApp.factory('Dashboard', ['$resource', function($resource) {
    return $resource("/dashboards/:id", { id: "@id" },
      {
        'create':  { method: 'POST' },
        'index':   { method: 'GET', isArray: true },
        'show':    { method: 'GET', isArray: false },
        'update':  { method: 'PUT' },
        'destroy': { method: 'DELETE' }
      }
    );
  }]);
  </code></pre>
  
  <p>In order to update a dashboard I need to use the <strong>class method</strong>: </p>
  
  <pre><code>$scope.dashboard = Dashboard.get({ id: 1234 });
  Dashboard.update({ id: $scope.dashboard.id }, $scope.dashboard);
  </code></pre>
  
  <p>Instead is there a way I can call it as an <strong>instance method</strong> of a particular dashboard?</p>
  
  <pre><code>$scope.dashboard = Dashboard.get({id: 1234 });
  $scope.dashboard.update();
  </code></pre>