title: Make angularjs $resource return array of [OO] objects
body: <p>How to make angularjs $resource return an array of objects derived/prototyped from specified domain object?</p>
  
  <p>Here is an example on <a href="http://plnkr.co/edit/AVLQItPIfoLwsgDzoBdK?p=preview" rel="noreferrer">http://plnkr.co/edit/AVLQItPIfoLwsgDzoBdK?p=preview</a> that processes a set of <code>Note</code>s objects.</p>
  
  <pre><code>app.controller('MainCtrl', function($scope, NoteResource) {
  $scope.name = 'World';
  $scope.notes  = NoteResource.query();
  
  $scope.spellCheckAllNotes = function() {
    angular.forEach($scope.notes, function(note) {
      note.spellCheck();
     });
   }
  });
  </code></pre>
  
  <p>The issue is that $resource returns array of <code>Resource</code>s and not an array of <code>Note</code>s with <code>Resource</code> methods added to prototypes.</p>
  
  <p>[solution shall follow "good" javascript practices]</p>