title: Cannot read property 'protocol' of undefined
body: <p>Getting that error in console when trying to get data from a API. Anybody have this issue before?</p>
  
  <pre><code>var url = "https://api.website.com/get/?type=events&amp;lat=" + localStorage.getItem('latitude')
  + "&amp;lng=" + localStorage.getItem('longitude') + "&amp;distance=50";
  
  $http({
      headers: {
          'Content-type': 'application/json'
      }
  })
  
  $http.get(url).success(function (events) {
      $scope.events = events;
  });
  </code></pre>
  
  <p>error:</p>
  
  <pre><code>TypeError: Cannot read property 'protocol' of undefined
  at Gb (http://localhost:38772/www/js/plugins/angular.min.js:114:238)
  at s (http://localhost:38772/www/js/plugins/angular.min.js:65:249)
  at new EventsController (http://localhost:38772/www/js/angular.js:4:5)
  at d (http://localhost:38772/www/js/plugins/angular.min.js:30:452)
  at Object.instantiate (http://localhost:38772/www/js/plugins/angular.min.js:31:80)
  at http://localhost:38772/www/js/plugins/angular.min.js:61:486
  at http://localhost:38772/www/js/plugins/angular.min.js:49:14
  at q (http://localhost:38772/www/js/plugins/angular.min.js:7:380)
  at E (http://localhost:38772/www/js/plugins/angular.min.js:48:382)
  at f (http://localhost:38772/www/js/plugins/angular.min.js:42:399) 
  </code></pre>