Get hashPrefix from $location #15683
Description
Note: for support questions, please use one of these channels: https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#question. This repository's issues are reserved for feature requests and bug reports.
Do you want to request a feature or report a bug?
feature
What is the current behavior?
Currently, there is no possibility to read the hashPrefix outside of a config-block. So the application needs an own implementation to get the configured hashPrefix in for example a controller or service.
What is the expected behavior?
It would be nice to get a (readonly) property on $location to get the hashPrefix.
What is the motivation / use case for changing the behavior?
With the property it is possible to access the hashPrefix without any calculation.
Which versions of AngularJS, and which browser / OS are affected by this issue? Did this work in previous versions of AngularJS? Please also test with the latest stable and snapshot (https://code.angularjs.org/snapshot/) versions.
1.6.0 and higher
Other information (e.g. stacktraces, related issues, suggestions how to fix)
Thx!