In IIS, my web app runs in an application under the website. So instead of being accessible at www.example.com
, it is actually at www.example.com/somepath/
.
If I use window.location.pathname
, I can get my hands on the /somepath/
portion, but with Angular's $location.path()
I get nothing. From the official documentation, it seems like $location.path()
should only get whatever comes after the hash, e.g. www.example.com/somepath/#/nextbit
will give me /nextbit
.
So how do I get my hands on the actual path where the website is hosted?