Location

Stable

Class

What it does

Location is a service that applications can use to interact with a browser's URL.

Class Overview

class Location {
staticnormalizeQueryParams(params: string) : string
staticjoinWithSlash(start: string, end: string) : string
staticstripTrailingSlash(url: string) : string
constructor(platformStrategy: LocationStrategy)

path(includeHash?: boolean) : string
isCurrentPathEqualTo(path: string, query?: string) : boolean
normalize(url: string) : string
prepareExternalUrl(url: string) : string
go(path: string, query?: string) : void
replaceState(path: string, query?: string) : void
forward() : void
back() : void
subscribe(onNext: (value: any) => void, onThrow?: (exception: any) => void, onReturn?: () => void) : Object

}

Class Description

Annotations

@Injectable()

Constructor

constructor(platformStrategy: LocationStrategy)

Static Members

Class Details

exported from @angular/common/index, defined in @angular/common/src/location/location.ts