title: query() with Angular $resources always “Undefined is not a function”
body: <p>I simply use following code to call query() with ngRecourse, but it always hits “Undefined is not a function”</p>
  
  <p>[demo.js]</p>
  
  <pre><code>var app = angular.module('StarterApp', ['ngResource']);
  
  app.factory("resourceFactory", function($resource) {
    return $resource("js/demo2.json", {}, {
      'get':{method:'GET'},
      'query':{method:'GET',isArray:true,url:"js/demo2.json"},
      'save':{method:'POST'}
    });
  });
  
  app.controller('appCtrl', function($scope, resourceFactory){
    'use strict';
  
    var ajax = new resourceFactory;
    ajax.$query(function(response) {
      console.log(response);
    });
  
  });
  </code></pre>
  
  <p>[demo2.json]</p>
  
  <pre><code>[
    {"demo2":"test"}
  ]
  </code></pre>
  
  <p>[error]</p>
  
  <pre><code>TypeError: undefined is not a function
      at http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular-resource.min.js:9:466
      at s (http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js:7:302)
      at d.module.provider.$get.e.(anonymous function).q.then.p.$resolved (http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular-resource.min.js:9:423)
      at http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js:112:20
      at l.$get.l.$eval (http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js:125:305)
      at l.$get.l.$digest (http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js:122:398)
      at l.$get.l.$apply (http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js:126:58)
      at l (http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js:81:171)
      at S (http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js:85:301)
      at XMLHttpRequest.D.onload (http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js:86:315)
  </code></pre>
  
  <p>If I use "$get" with simple object return, it works. So I am pretty not sure what is going wrong with my code.</p>