A LocationStrategy
used to configure the Location
service to represent its state in the hash fragment of the browser's URL.
class HashLocationStrategy extends LocationStrategy { onPopState(fn: LocationChangeListener): void getBaseHref(): string path(includeHash: boolean = false): string prepareExternalUrl(internal: string): string pushState(state: any, title: string, path: string, queryParams: string) replaceState(state: any, title: string, path: string, queryParams: string) forward(): void back(): void // 继承自 common/LocationStrategy abstract path(includeHash?: boolean): string abstract prepareExternalUrl(internal: string): string abstract pushState(state: any, title: string, url: string, queryParams: string): void abstract replaceState(state: any, title: string, url: string, queryParams: string): void abstract forward(): void abstract back(): void abstract onPopState(fn: LocationChangeListener): void abstract getBaseHref(): string }方法
|
---|
getBaseHref(): string参数没有参数。 返回值string
|
|
---|
path(includeHash: boolean = false): string参数includeHash | Type: boolean . 可选. 默认值是 false . |
返回值string
|
|
---|
prepareExternalUrl(internal: string): string参数返回值string
|
|
---|
pushState(state: any, title: string, path: string, queryParams: string)参数state | Type: any . | title | Type: string . | path | Type: string . | queryParams | Type: string . |
|
|
---|
replaceState(state: any, title: string, path: string, queryParams: string)参数state | Type: any . | title | Type: string . | path | Type: string . | queryParams | Type: string . |
|
|
---|
forward(): void参数没有参数。 返回值void
|
|
---|
back(): void参数没有参数。 返回值void
|