title: Split is not a function: Trying to get response from api through GET using ngResource
body: <p>I want to use <code>get</code> method to get some response from API using ngResource.</p>
  
  <p>I have created a factory for my resource but when I use the factory in my controller it throws error <code>URL.split is not a function</code>. I don't understand what the problem is in my code.</p>
  
  <pre><code>var Myapp = angular.module('starter.controllers', ['ngResource'])
      .config(['$resourceProvider', function ($resourceProvider) {
              $resourceProvider.defaults.stripTrailingSlashes = false;
          }]);
  Myapp.factory('Users', function ($resource) {
      return $resource('some URL', {}, {
         query: {
            method: 'GET'
         }
      });
  });
  Myapp.controller('DashCtrl', ['$scope', '$state', 'Users', function ($scope, $state, Users) {
      Users.query().$promise.then(function (data) {
          alert(JSON.stringify(data, null, 4));
      }, function (error) {
          console.log('Error is: ' + JSON.stringify(error, null, 4));
      });
  
  }])
  </code></pre>