• Overview
@angular/common/testing

SpyLocation

Class

A spy for Location that allows tests to fire simulated location events.

  
    class SpyLocation implements Location {}
  
  

urlChanges

string[]

ngOnDestroy

void
@returnsvoid

setInitialPath

void
@paramurlstring
@returnsvoid

setBaseHref

void
@paramurlstring
@returnsvoid

path

string
@returnsstring

getState

unknown
@returnsunknown

isCurrentPathEqualTo

boolean
@parampathstring
@paramquerystring
@returnsboolean

simulateUrlPop

void
@parampathnamestring
@returnsvoid

simulateHashChange

void
@parampathnamestring
@returnsvoid

prepareExternalUrl

string
@paramurlstring
@returnsstring

go

void
@parampathstring
@paramquerystring
@paramstateany
@returnsvoid

replaceState

void
@parampathstring
@paramquerystring
@paramstateany
@returnsvoid

forward

void
@returnsvoid

back

void
@returnsvoid

historyGo

void
@paramrelativePositionnumber
@returnsvoid

onUrlChange

VoidFunction
@paramfn(url: string, state: unknown) => void
@returnsVoidFunction

subscribe

SubscriptionLike
@paramonNext(value: any) => void
@paramonThrow((error: any) => void) | null | undefined
@paramonReturn(() => void) | null | undefined
@returnsSubscriptionLike

normalize

string
@paramurlstring
@returnsstring
Jump to details