My application calls $HTTP many times like this:
this.$http({ method: this.method, url: this.url })
The this.url is alw
set baseUrl in $rootScope:
$rootScope
app.run(function($rootScope) { $rootScope.baseUrl = "https://newserver.com"; });
add $rootScope into your app's controllers:
app.controller('Controller', ['$rootScope', function($rootScope){ ... this.$http({ method: this.method, url: $rootScope.baseUrl + this.url })