A spy for Locationthat allows tests to fire simulated location events.
属性
| 属性名 | 类型 | 说明 |
|---|
| urlChanges | | |
方法
|
|---|
setInitialPath(url: string)参数 |
|
|---|
setBaseHref(url: string)参数 |
|
|---|
path(): string参数没有参数。 返回值string
|
|
|---|
isCurrentPathEqualTo(path: string, query: string = ''): boolean参数| path | Type: string. | | query | Type: string. 可选. 默认值是 ''. |
返回值boolean
|
|
|---|
prepareExternalUrl(url: string): string参数返回值string
|
|
|---|
go(path: string, query: string = '', state: any = null)参数| path | Type: string. | | query | Type: string. 可选. 默认值是 ''. | | state | Type: any. 可选. 默认值是 null. |
|
|
|---|
replaceState(path: string, query: string = '', state: any = null)参数| path | Type: string. | | query | Type: string. 可选. 默认值是 ''. | | state | Type: any. 可选. 默认值是 null. |
|
|
|---|
subscribe(onNext: (value: any) => void, onThrow?: ((error: any) => void) | null, onReturn?: (() => void) | null): SubscriptionLike参数| onNext | Type: (value: any) => void. | | onThrow | Type: ((error: any) => void) | null. 可选. 默认值是 undefined. | | onReturn | Type: (() => void) | null. 可选. 默认值是 undefined. |
返回值SubscriptionLike
|
|
|---|
normalize(url: string): string参数返回值string
|