title: How can I Read multiple JSON files through Angular Resources Service?
body: <p>Here, I got my module like:</p>
  
  <pre><code>var eventsApp = angular.module('eventsApp', [ngResource]);
  </code></pre>
  
  <p>then I have my service like this:</p>
  
  <pre><code>eventsApp.factory('listData', function($resource){
     return $resource('/data/event/:eventid', {}, {
         'update': {method:'PUT'},
         'query': {method: 'GET', isArray: true}
     });
  });
  </code></pre>
  
  <p>And as well in my controller, I have:</p>
  
  <pre><code>eventsApp.controller('EventListController', 
      function EventListController($scope, listData) {
          $scope.events = listData.query();
      }
  );
  </code></pre>
  
  <p>Then I use <em>ngRepeat</em> in order to go through the data I got back from <em>$resource</em>, like:</p>
  
  <pre><code>&lt;li ng-repeat="event in events"&gt; do sth..&lt;/li&gt;
  </code></pre>
  
  <p>As in my directory "/data/event", I have several JSON files named 1, 2, 3, 4. Give 1 a shot:</p>
  
  <pre><code>{
      "id": 1,
      "name": "Angular Boot Camp",
      "date": "1/1/2013",
      "time": "13:40 pm",
      "creator":"bob",
      "location":{
          "address": "Google HQ",
          "city": "Mountain View",
          "province": "CA"
      },
      "imageUrl": "/img/angularjs-logo.jpg"
  }
  </code></pre>
  
  <p>What I want to do is to get all the four files back into an array of objects using <em>$resource.query()</em>, but it seems like I have to set up my web-server or something?</p>