title: How can I change the base URL of an AngularJS HTTP call?
body: <p>My application calls $HTTP many times like this:</p>
  
  <pre><code>    this.$http({
          method: this.method,
          url: this.url
      })
  </code></pre>
  
  <p>The this.url is always set to something like /app/getdata</p>
  
  <p>Now I have moved the back-end of my application to another server and I will need to get data like this:</p>
  
  <pre><code>https://newserver.com/app/getdata
  </code></pre>
  
  <p>Is there a way that I can supply a base URL that will be used for all the $http calls?</p>