Regarding $location.search, the docs say,
Return search part (as object) of current url when called without any parameter.
In my
If you just need to look at the query string as text, you can use: $window.location.search
$window.location.search