- $location
- provider in module ng
Use the $locationProvider to configure how the application deep linking paths are stored.
Methods
-
hashPrefix([prefix]);
Parameters
Param Type Details prefix (optional)stringPrefix for hash part (containing path and search)
Returns
*current value if used as getter or itself (chaining) if used as setter
-
html5Mode([mode]);
Parameters
Param Type Details mode (optional)booleanObjectIf boolean, sets
html5Mode.enabledto value. If object, setsenabled,requireBaseandrewriteLinksto respective values. Supported properties:-
enabled â
{boolean}â (default: false) If true, will rely onhistory.pushStateto change urls where supported. Will fall back to hash-prefixed paths in browsers that do not supportpushState. -
requireBase -
{boolean}- (default:true) When html5Mode is enabled, specifies whether or not a tag is required to be present. IfenabledandrequireBaseare true, and a base tag is not present, an error will be thrown when$locationis injected. See the $location guide for more information -
rewriteLinks -
{boolean}- (default:true) When html5Mode is enabled, enables/disables url rewriting for relative links.
Returns
Objecthtml5Mode object if used as getter or itself (chaining) if used as setter
-
enabled â
Please login to continue.