LocationStrategy

LocationStrategy

Stable Class

Class Overview

class LocationStrategy {
  path(includeHash?: boolean) : string
  prepareExternalUrl(internal: string) : string
  pushState(state: any, title: string, url: string, queryParams: string) : void
  replaceState(state: any, title: string, url: string, queryParams: string) : void
  forward() : void
  back() : void
  onPopState(fn: LocationChangeListener) : void
  getBaseHref() : string
}

Class Description

LocationStrategy is responsible for representing and reading route state from the browser's URL. Angular provides two strategies: