Using a full URL with Restangular


I like all of the functions of Restangular for AngularJS, except that I can’t find (and it may not support) a way of just passing a full URL to it. I realize the benefit of the .one(‘something’,’someparam’) but my issue is that I’m passed various URL strings, and I really don’t want to have to split() them just to use Restangular.

Also, I know about the baseURL function; but these URLs I’m being passed don’t necessarily derive from the same base path.

For example, I might have:


All I’m given are the Strings…


I’m the creator of Restangular.

You have 2 options to do that.

1) Creating scoped Restangulars with different BaseURLs in each case:

2) You can use it like Restangular.all('us/en/').one('products', 1726) or'us/en/product', 1234)

Hope it works for you 🙂

Answered By – mgonto

Answer Checked By – Candace Johnson (AngularFixing Volunteer)

Leave a Reply

Your email address will not be published.