In a mode other than HTML5 $location.search() get information only after # , for example
For URL:
http://google.com/dir?query=123
$ location.search () - {a: 456}
$ location.hash () is "" because if you define a route without HTML5, everything after # will become part of $location.path() , so the hash will no longer be selected.
Daiwei
source share