1
|
import { LocationStrategy } from './location_strategy';
|
2
|
import { LocationChangeListener, PlatformLocation } from './platform_location';
|
3
|
/**
|
4
|
* @whatItDoes Use URL hash for storing application location data.
|
5
|
* @description
|
6
|
* `HashLocationStrategy` is a {@link LocationStrategy} used to configure the
|
7
|
* {@link Location} service to represent its state in the
|
8
|
* [hash fragment](https://en.wikipedia.org/wiki/Uniform_Resource_Locator#Syntax)
|
9
|
* of the browser's URL.
|
10
|
*
|
11
|
* For instance, if you call `location.go('/foo')`, the browser's URL will become
|
12
|
* `example.com#/foo`.
|
13
|
*
|
14
|
* ### Example
|
15
|
*
|
16
|
* {@example common/location/ts/hash_location_component.ts region='LocationComponent'}
|
17
|
*
|
18
|
* @stable
|
19
|
*/
|
20
|
export declare class HashLocationStrategy extends LocationStrategy {
|
21
|
private _platformLocation;
|
22
|
private _baseHref;
|
23
|
constructor(_platformLocation: PlatformLocation, _baseHref?: string);
|
24
|
onPopState(fn: LocationChangeListener): void;
|
25
|
getBaseHref(): string;
|
26
|
path(includeHash?: boolean): string;
|
27
|
prepareExternalUrl(internal: string): string;
|
28
|
pushState(state: any, title: string, path: string, queryParams: string): void;
|
29
|
replaceState(state: any, title: string, path: string, queryParams: string): void;
|
30
|
forward(): void;
|
31
|
back(): void;
|
32
|
}
|