If my URL is http://www.something.com/foo/bar/index.html?color=yellow&animal=rat
, it seems as though:
$location.path()
will returnfoo/bar/index.html
$location.absUrl()
will returnhttp://www.something.com/foo/bar/index.html?color=yellow&animal=rat
$location.url()
will returnfoo/bar/index.html?color=yellow&animal=rat
Is there any function which will return http://www.something.com/foo/bar/index.html
?
Or do I have to construct that myself with functions like protcol, host, port, etc. (or strip the query params off myself)?