title: displaying data ng-repeat from $scope.items query not working
body: <p>I do not know what is wrong, <strong>ng-repeat</strong> is not
  populating the information on my div, please look at the following
  and advice where I have gone wrong</p>
  
  <p><strong>app.js</strong></p>
  
  <pre><code>var mainApp = angular.module('mainApp', ["ngRoute", "ngResource"]);
  mainApp.factory('EventListFactory',['$resource', EventListFactory]);
  mainApp.controller('EventListCtrl', ['$scope','EventListFactory', EventListCtrl]);
  var configFunction = function ($routeProvider) {
      $routeProvider.
          when('/Register', {
              templateUrl: 'routesDemo/Register'
          })
          .when('/UpdateProfile', {
              templateUrl: 'routesDemo/UpdateProfile'
          })
          .when('/Events', {
              templateUrl: 'routesDemo/Events', 
              controller: EventListCtrl,
          })
          .when('/routeThree', {
              templateUrl: 'routesDemo/three'
          });
  }
  configFunction.$inject = ['$routeProvider'];
  mainApp.config(configFunction);
  </code></pre>
  
  <p><strong>EventListFactory.js</strong></p>
  
  <pre><code>var EventListFactory = function ($resource, $location) {
  
          var baseUrl = "";
          if (window.location.hostname == 'localhost') {
              baseUrl = "http://localhost:52182/api/Events/GetEvents/";
          }
          else
          {
              var deployAt = window.location.href.substring(0, window.location.href);
              baseUrl = deployAt + "/api/Events/GetEvents";
          }
  
          var respone = $resource(baseUrl, null, { query: { method: 'GET', isArray: true, url: baseUrl }, get: { method: 'GET', url: baseUrl } });
          console.log("api json at :" + baseUrl);
          var records = respone.query();
          console.log(records);
          return records;
  }
  </code></pre>
  
  <p><strong><em>EventListController.js</em></strong></p>
  
  <pre><code>var EventListCtrl = function ($scope, EventListFactory) {
      $scope.Message = 'I work';
      $scope.items = EventListFactory;
  };
  
  EventListCtrl.$inject = ['$scope'];
  </code></pre>
  
  <p><strong>in the html:</strong></p>
  
  <pre><code>&lt;div id="listView" &gt;
      &lt;h1 class="form-signin-heading"&gt;For real {{Message}}&lt;/h1&gt;
      &lt;div ng-controller="EventListCtrl"&gt;
          &lt;p class="form-signin-heading"&gt;Populated Data&lt;/p&gt;
          &lt;div ng-repeat="item in items "&gt;
              &lt;span class="control-label"&gt;Heading : &lt;/span&gt; {{item.Heading}}
              &lt;br/&gt;
              &lt;span class="control-label"&gt;Event Date : &lt;/span&gt; {{item.EventDate}}
              &lt;br/&gt;
  
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>running the site:</strong></p>
  
  <p><a href="https://i.stack.imgur.com/J2pqB.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/J2pqB.jpg" alt="enter image description here"></a></p>
  
  <p><strong>api call from browser:</strong>
  <a href="https://i.stack.imgur.com/L1QXb.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/L1QXb.jpg" alt="enter image description here"></a></p>