# Class $LocationProvider

- Defined in core/location/location.js:547

#####
Index

### Constructors

constructor

### Properties

$get
hashPrefix
html5Mode

##
Constructors

### constructor

- new $LocationProvider(): $LocationProvider

- #### Returns $LocationProvider

  - Defined in core/location/location.js:547

##
Properties

### $get

$get: (string | (($rootScope: Scope, $browser: Browser, $rootElement: JQLite) => Location))[]

- Defined in core/location/location.js:611

### hashPrefix

hashPrefix: ((prefix: string) => any)

The default value for the prefix is `'!'`.

#### Type declaration

- - (prefix): any

  - #### Parameters

    - prefix: string

      Prefix for hash part (containing path and search)

    #### Returns any

    current value if used as getter or itself (chaining) if used as setter

- Defined in core/location/location.js:560

### html5Mode

html5Mode: ((mode: any) => any)

#### Type declaration

- - (mode): any

  - #### Parameters

    - mode: any

      If boolean, sets `html5Mode.enabled` to value. If object, sets `enabled`, `requireBase` and `rewriteLinks` to respective values. Supported properties:

      - enabled – `{boolean}` – (default: false) If true, will rely on `history.pushState` to change urls where supported. Will fall back to hash-prefixed paths in browsers that do not support `pushState`.
      - requireBase - `{boolean}` - (default: `true`) When html5Mode is enabled, specifies whether or not a tag is required to be present. If `enabled` and `requireBase` are true, and a base tag is not present, an error will be thrown when `$location` is injected. See the guide/$location $location guide for more information
      - rewriteLinks - `{boolean|string}` - (default: `true`) When html5Mode is enabled, enables/disables URL rewriting for relative links. If set to a string, URL rewriting will only happen on links with an attribute that matches the given string. For example, if set to `'internal-link'`, then the URL will only be rewritten for `<a internal-link>` links. Note that attribute name normalization does not apply here, so `'internalLink'` will not match `'internal-link'`.

    #### Returns any

    html5Mode object if used as getter or itself (chaining) if used as setter

- Defined in core/location/location.js:588