I'm using AngularJS and Restangular. How can I define the baseUrl to use on run time? I dont think that I can use run or config methods since is the user the one who selects the server to connect to.
I have this so far:
var rest = Restangular.withConfig(function(RestangularConfigurer){
RestangularConfigurer.setBaseUrl(baseUrl);
});
This works fine when using rest to do the calls BUT when Im in need of using Restangular.copy this Restangular does not have the baseUrl defined.
How could I defined the Restangular.baseUrl for the Global/ Singleton one on run time?