I need to get at the search parameters (those after the ?
) not the hash parameters (those after the #
). Problem is, $location.search()
switches between them based on the html5Mode settings, which is not what I want.
Short of parsing the URL myself, is there any way to get Angular to disgorge this information?
In non-HTML5 mode $location.search()
only retrieve information after #
, e.g.
For url:
http://google.com/dir?query=123#/route?a=456
$location.search() is {a: 456}
$location.hash() is ""
, because if you define non-HTML5 route, everything after #
will become part of $location.path()
thus hash is not picked up anymore.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With