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

  • Parameters

    • $locationProvider ILocationProvider

Properties

$browser: any
$location: ILocationService
$locationProvider: ILocationProvider
$sniffer: any
$window: IWindowService
_baseHref: string
_urlListeners: Function[] = []
hash: any
hashPrefix: any
host: any
path: any
port: any
protocol: any
search: any

Methods

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

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

    Returns void


  • baseHref(): any
  • Returns any


  • dispose(): void
  • Returns void


  • html5Mode(): any
  • Returns any


  • onChange(callback: Function): (Anonymous function)
  • Parameters

    • callback Function

    Returns (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