2016-07-20 20:51:21 -04:00
|
|
|
export declare class MockLocationStrategy extends LocationStrategy {
|
|
|
|
internalBaseHref: string;
|
|
|
|
internalPath: string;
|
|
|
|
internalTitle: string;
|
|
|
|
urlChanges: string[];
|
|
|
|
constructor();
|
|
|
|
back(): void;
|
|
|
|
forward(): void;
|
|
|
|
getBaseHref(): string;
|
|
|
|
onPopState(fn: (value: any) => void): void;
|
|
|
|
path(includeHash?: boolean): string;
|
|
|
|
prepareExternalUrl(internal: string): string;
|
|
|
|
pushState(ctx: any, title: string, path: string, query: string): void;
|
|
|
|
replaceState(ctx: any, title: string, path: string, query: string): void;
|
|
|
|
simulatePopState(url: string): void;
|
|
|
|
}
|
|
|
|
|
2016-06-22 17:56:10 -04:00
|
|
|
export declare class SpyLocation implements Location {
|
|
|
|
urlChanges: string[];
|
2016-06-23 21:19:32 -04:00
|
|
|
back(): void;
|
|
|
|
forward(): void;
|
2018-01-24 12:19:59 -05:00
|
|
|
go(path: string, query?: string, state?: any): void;
|
2016-06-22 17:56:10 -04:00
|
|
|
isCurrentPathEqualTo(path: string, query?: string): boolean;
|
2016-06-23 21:19:32 -04:00
|
|
|
normalize(url: string): string;
|
|
|
|
path(): string;
|
2016-06-22 17:56:10 -04:00
|
|
|
prepareExternalUrl(url: string): string;
|
2018-01-24 12:19:59 -05:00
|
|
|
replaceState(path: string, query?: string, state?: any): void;
|
2016-06-23 21:19:32 -04:00
|
|
|
setBaseHref(url: string): void;
|
|
|
|
setInitialPath(url: string): void;
|
|
|
|
simulateHashChange(pathname: string): void;
|
|
|
|
simulateUrlPop(pathname: string): void;
|
2018-02-27 17:06:06 -05:00
|
|
|
subscribe(onNext: (value: any) => void, onThrow?: ((error: any) => void) | null, onReturn?: (() => void) | null): SubscriptionLike;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|