I have my web application deployed to tomcat with an applicatio context. For example my URL looks something like this.
http://localhost:8080/myapp
if you are using hashbang mode, with "#", you can do something like that:
$location.absUrl().substr(0, $location.absUrl().lastIndexOf("#")) + "/getusers"