MockPlatformLocation
Mock implementation of URL state.
class MockPlatformLocation implements PlatformLocation {
hostname
protocol
port
pathname
search
hash
state
href: string
url: string
getBaseHrefFromDOM(): string
onPopState(fn: LocationChangeListener): VoidFunction
onHashChange(fn: LocationChangeListener): VoidFunction
replaceState(state: any, title: string, newUrl: string): void
pushState(state: any, title: string, newUrl: string): void
forward(): void
back(): void
historyGo(relativePosition: number = 0): void
getState(): unknown
}
Properties
Property | Description |
---|---|
hostname
|
Read-Only |
protocol
|
Read-Only |
port
|
Read-Only |
pathname
|
Read-Only |
search
|
Read-Only |
hash
|
Read-Only |
state
|
Read-Only |
href: string
|
Read-Only |
url: string
|
Read-Only |
Methods
getBaseHrefFromDOM() |
---|
ParametersThere are no parameters. Returns
|
onPopState() | |||
---|---|---|---|
Parameters
Returns
|
onHashChange() | |||
---|---|---|---|
Parameters
Returns
|
replaceState() |
---|
pushState() |
---|
forward() |
---|
ParametersThere are no parameters. Returns
|
back() |
---|
ParametersThere are no parameters. Returns
|
historyGo() |
---|
getState() |
---|
ParametersThere are no parameters. Returns
|