I have a url which looks like below
http://localhost:8080/test#/users/list
When I use the below:-
$location.url() gives me -> "users/list"
$location.path() gives me -> "users/list"
$location.absUrl() gives me ->"http://localhost:8080/test#/users/list" the entire url
$location.host() gives me-> "localhost"
Is there any way I can get just :- http://localhost:8080/test#/ or even test#/ ?
I could get the entire url and split it on /, but was trying to find if there was another way.
$location.absUrl().replace($location.path(), '')?http://localhost:8080/test?someid=123&debug=true#/users/listit would give mehttp://localhost:8080/test?someid=123&debug=true#rather thanhttp://localhost:8080/test@HereticMonkey$locationmay be of less use to you.