# Interface Html5Mode

interface Html5Mode {
enabled: boolean;
requireBase: boolean;
rewriteLinks: string | boolean;
}

- Defined in src/core/location/location.js:26

##### Index

### Properties

enabled
requireBase
rewriteLinks

## Properties

### enabled

enabled: boolean

(default: false) If true, will rely on `history.pushState` to change URLs where supported. Falls back to hash-prefixed paths in browsers that do not support `pushState`.

- Defined in src/core/location/location.js:27

### requireBase

requireBase: boolean

(default: `true`) When html5Mode is enabled, specifies whether or not a `<base>` tag is required to be present. If both `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.

- Defined in src/core/location/location.js:30

### rewriteLinks

rewriteLinks: string | boolean

(default: `true`) When html5Mode is enabled, enables or disables URL rewriting for relative links. If set to a string, URL rewriting will only apply to links with an attribute that matches the given string. For example, if set to `'internal-link'`, URL rewriting will only occur for `<a internal-link>` links. Note that attribute name normalization does not apply here, so `'internalLink'` will not match `'internal-link'`.

- Defined in src/core/location/location.js:34