Primjer pokazuje upotrebu sevisa
$location
. Pogledati URL u address baru browsera.
Hashbang URL:
60location_getters.html#!/path?param1=value1#hashValue
Server URL + Hashbang URL:
60location_getters.html?id=12#!/path?param1=value1#hashValue
reset URL-a:
60location_getters.html
getInfo
$location.absUrl() daje
{{abs}}
$location.hash() daje
{{has}}
$location.host() daje
{{hst}}
$location.path() daje
{{pth}}
$location.protocol() daje
{{prt}}
$location.search() daje
{{sch}}
$location.url() daje
{{url}}