title: Why the port number is cut when angular app call rest service
body: <p>I have rest service:</p>
  
  <pre><code>http://localhost:3000/api/brands
  </code></pre>
  
  <p>When I test it from web browser it works well.</p>
  
  <p>I use it in angular service:</p>
  
  <pre><code>var motoAdsServices = angular.module('motoAdsServices', ['ngResource']);
  
  motoAdsServices.factory('Brand', ['$resource', function($resource) {
      return $resource('http://localhost:3000/api/:id', {}, {
        query: {
          method: 'GET',
          params: {
            id: 'brands'
          },
          isArray: true
        }
      });
    }]);
  </code></pre>
  
  <p>When it is call I have error because in reqest URL I don't have port number:</p>
  
  <pre><code>Request URL: http://localhost/api/brands
  </code></pre>
  
  <p>Why the port numer is is cut? Angular cut it?</p>
  
  <p>In <a href="http://docs.angularjs.org/api/ngResource.$resource" rel="noreferrer">Angular doc</a> is written:</p>
  
  <p><em>A parametrized URL template with parameters prefixed by : as in /user/:username. If you are using a URL with a port number (e.g. <code>http://example.com:8080/api</code>), it will be respected.</em></p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I use angular version 1.0.8 (thank @KayakDave for your attention) but <a href="http://docs.angularjs.org/api/ngResource.$resource" rel="noreferrer">Angular doc</a> applies to version 1.2. </p>