title: $window.location.origin gives wrong value when using IE
body: <p><code>$window.location.origin</code> returns the wrong value on IE.</p>
  
  <blockquote>
    <p>The origin property returns the protocol, hostname and port number of a URL.</p>
  </blockquote>
  
  <p>Example</p>
  
  <p>url: <a href="http://localhost:8080/products/search">http://localhost:8080/products/search</a></p>
  
  <p><strong>Chrome</strong>:
  <code>$window.location.origin</code> returns <a href="http://localhost:8080">http://localhost:8080</a></p>
  
  <p><strong>IE:</strong>
  <code>$window.location.origin</code> returns <a href="http://localhost:8080/products/search">http://localhost:8080/products/search</a></p>
  
  <p>How can I have the right value on IE?</p>