SpyLocation
Class
A spy for Location
that allows tests to fire simulated location events.
API
class SpyLocation implements Location {}
urlChanges
string[]
ngOnDestroy
void
@returns
void
setInitialPath
void
@paramurl
string
@returns
void
setBaseHref
void
@paramurl
string
@returns
void
path
string
@returns
string
getState
unknown
@returns
unknown
isCurrentPathEqualTo
boolean
@parampath
string
@paramquery
string
@returns
boolean
simulateUrlPop
void
@parampathname
string
@returns
void
simulateHashChange
void
@parampathname
string
@returns
void
prepareExternalUrl
string
@paramurl
string
@returns
string
go
void
@parampath
string
@paramquery
string
@paramstate
any
@returns
void
replaceState
void
@parampath
string
@paramquery
string
@paramstate
any
@returns
void
forward
void
@returns
void
back
void
@returns
void
historyGo
void
@paramrelativePosition
number
@returns
void
onUrlChange
VoidFunction
@paramfn
(url: string, state: unknown) => void
@returns
VoidFunction
subscribe
SubscriptionLike
@paramonNext
(value: any) => void
@paramonThrow
((error: any) => void) | null | undefined
@paramonReturn
(() => void) | null | undefined
@returns
SubscriptionLike
normalize
string
@paramurl
string
@returns
string
Jump to details