PushStateLocationService | @uirouter/core
Options
Menu

Class PushStateLocationService

A LocationServices that gets/sets the current location using the browser's location and history apis

Uses history.pushState and history.replaceState

Hierarchy

Implements

Index

Constructors

Properties

_history: HistoryLike
_location: LocationLike
fireAfterUpdate: boolean

Methods

  • _get(): string
  • _getBasePrefix(): string
  • Gets the base prefix without:

    • trailing slash
    • trailing filename
    • protocol and hostname
  • Gets the base prefix without:

    • trailing slash
    • trailing filename
    • protocol and hostname

    If , this returns '/base'. If , this returns '/foo/base'. If , this returns '/base'. If , this returns '/base'. If , this returns ''. If , this returns ''. If , this returns ''.

    See: https://html.spec.whatwg.org/dev/semantics.html#the-base-element

    Returns string


  • _listener(evt: any): void
  • _set(state: any, title: string, url: string, replace: boolean): void
  • Parameters

    • state any
    • title string
    • url string
    • replace boolean

    Returns void


  • hash(): any
  • onChange(cb: EventListener): (Anonymous function)
  • Parameters

    • cb EventListener

    Returns (Anonymous function)


  • path(): any
  • search(): any
  • url(url?: string, replace?: boolean): string
  • Parameters

    • url: Optional  string
    • replace: Default value  boolean = true

    Returns string


Generated using TypeDoc