MockLocationStrategy
Class
stable
A mock implementation of LocationStrategy that allows tests to fire simulated
location events.
API
class MockLocationStrategy extends LocationStrategy { internalBaseHref: string; internalPath: string; internalTitle: string; urlChanges: string[]; simulatePopState(url: string): 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; onPopState(fn: (value: any) => void): void; getBaseHref(): string; back(): void; forward(): void; getState(): unknown; optional override historyGo(relativePosition: number): void;}
internalBaseHref
stringinternalPath
stringinternalTitle
stringurlChanges
string[]simulatePopState
void@paramurl
string@returns
voidpath
string@paramincludeHash
boolean@returns
stringprepareExternalUrl
string@paraminternal
string@returns
stringpushState
void@paramctx
any@paramtitle
string@parampath
string@paramquery
string@returns
voidreplaceState
void@paramctx
any@paramtitle
string@parampath
string@paramquery
string@returns
voidonPopState
void@paramfn
(value: any) => void@returns
voidgetBaseHref
string@returns
stringback
void@returns
voidforward
void@returns
voidgetState
unknown@returns
unknownhistoryGo
void@paramrelativePosition
number@returns
voidJump to details