I setup API base url in Main.js with query param "advertiserId". I would like to remove the query param advertiserId
in Demo.js. Note I don't want to use $location
search params (since these are search params from current window URL not the URL I constructed).
Main.js:
Restangular.setBaseUrl("localhost:9000/advertisers");
Restangular.setDefaultRequestParams({
"advertiserId": advertiserID
});
Demo.js
Restangular.RemoveRequestParams({
"advertiserId": advertiserID
});
Couldn't you also just reset the defaults to an empty object in Demo.js?
Restangular.SetDefaultRequestParams({});
I'm guessing that the Restangular you're using in Demo.js is a newly created instance from the Restangular Service?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With