Ng1LocationServices | @uirouter/angularjs
Options
Menu

Class Ng1LocationServices

Implements UI-Router LocationServices and LocationConfig using Angular 1's $location service

Hierarchy

  • Ng1LocationServices

Implements

  • LocationConfig
  • LocationServices

Index

Constructors

Properties

$location: ILocationService
$locationProvider: ILocationProvider
$sniffer: any
_urlListeners: Function[] = []
baseHref: any
hash: any
hashPrefix: any
host: any
path: any
port: any
protocol: any
search: any

Methods

  • _runtimeServices($rootScope: any, $location: ILocationService, $sniffer: any, $browser: any): void
  • Parameters

    • $rootScope any
    • $location ILocationService
    • $sniffer any
    • $browser any

    Returns void


  • dispose(): void
  • html5Mode(): any
  • onChange(callback: Function): (Anonymous function)
  • url(newUrl?: string, replace?: boolean, state?: any): string
  • Parameters

    • newUrl: Optional  string
    • replace: Default value  boolean = false
    • state: Optional  any

    Returns string


  • monkeyPatchPathParameterType(router: UIRouter): void
  • Applys ng1-specific path parameter encoding

  • Applys ng1-specific path parameter encoding

    The Angular 1 $location service is a bit weird. It doesn't allow slashes to be encoded/decoded bi-directionally.

    See the writeup at https://github.com/angular-ui/ui-router/issues/2598

    This code patches the path parameter type so it encoded/decodes slashes as ~2F

    Parameters

    • router UIRouter
      :

    Returns void


Generated using TypeDoc