Cookies concent notice

This site uses cookies from Google to deliver its services and to analyze traffic.
Learn more
Skip to main content
This site is no longer updated.Head to Angular.devHome
/

This is the archived documentation for Angular v17. Please visit angular.dev to see this page for the current version of Angular.

LocationUpgradeConfig

Configuration options for LocationUpgrade.

      
      interface LocationUpgradeConfig {
  useHash?: boolean
  hashPrefix?: string
  urlCodec?: typeof UrlCodec
  serverBaseHref?: string
  appBaseHref?: string
}
    

Properties

Property Description
useHash?: boolean

Configures whether the location upgrade module should use the HashLocationStrategy or the PathLocationStrategy

hashPrefix?: string

Configures the hash prefix used in the URL when using the HashLocationStrategy

urlCodec?: typeof UrlCodec

Configures the URL codec for encoding and decoding URLs. Default is the AngularJSCodec

serverBaseHref?: string

Configures the base href when used in server-side rendered applications

appBaseHref?: string

Configures the base href when used in client-side rendered applications