UNPKG

1.31 kBTypeScriptView Raw
1import { UIRouter } from '../router';
2import { BaseLocationServices } from './baseLocationService';
3import { LocationConfig } from '../common';
4/**
5 * A `LocationServices` that gets/sets the current location using the browser's `location` and `history` apis
6 *
7 * Uses `history.pushState` and `history.replaceState`
8 */
9export declare class PushStateLocationService extends BaseLocationServices {
10 _config: LocationConfig;
11 constructor(router: UIRouter);
12 /**
13 * Gets the base prefix without:
14 * - trailing slash
15 * - trailing filename
16 * - protocol and hostname
17 *
18 * If <base href='/base/'>, this returns '/base'.
19 * If <base href='/foo/base/'>, this returns '/foo/base'.
20 * If <base href='/base/index.html'>, this returns '/base'.
21 * If <base href='http://localhost:8080/base/index.html'>, this returns '/base'.
22 * If <base href='/base'>, this returns ''.
23 * If <base href='http://localhost:8080'>, this returns ''.
24 * If <base href='http://localhost:8080/'>, this returns ''.
25 *
26 * See: https://html.spec.whatwg.org/dev/semantics.html#the-base-element
27 */
28 private _getBasePrefix;
29 protected _get(): string;
30 protected _set(state: any, title: string, url: string, replace: boolean): void;
31 dispose(router: UIRouter): void;
32}