Improve this Doc View Source $locationProvider
Use the $locationProvider
to configure how the application deep linking paths are stored.
Methods
-
hashPrefix([prefix]);
Parameters
Param Type Details prefix (optional)string
Prefix 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)boolean
Object
If boolean, sets
html5Mode.enabled
to value. If object, setsenabled
,requireBase
andrewriteLinks
to respective values. Supported properties:-
enabled –
{boolean}
– (default: false) If true, will rely onhistory.pushState
to 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 atag is required to be present. If enabled
andrequireBase
are true, and a base tag is not present, an error will be thrown when$location
is injected. See the $location guide for more information -
rewriteLinks -
{boolean}
- (default:true
) When html5Mode is enabled, enables/disables url rewriting for relative links.
Returns
Object
html5Mode object if used as getter or itself (chaining) if used as setter
-
enabled –
© 2010–2017 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://code.angularjs.org/1.4.14/docs/api/ng/provider/$locationProvider