• Overview
@angular/common/testing

MockLocationStrategy

Class

A mock implementation of LocationStrategy that allows tests to fire simulated location events.

  
    class MockLocationStrategy extends LocationStrategy {}
  
  

internalBaseHref

string

internalPath

string

internalTitle

string

urlChanges

string[]

simulatePopState

void
@paramurlstring
@returnsvoid

path

string
@paramincludeHashboolean
@returnsstring

prepareExternalUrl

string
@paraminternalstring
@returnsstring

pushState

void
@paramctxany
@paramtitlestring
@parampathstring
@paramquerystring
@returnsvoid

replaceState

void
@paramctxany
@paramtitlestring
@parampathstring
@paramquerystring
@returnsvoid

onPopState

void
@paramfn(value: any) => void
@returnsvoid

getBaseHref

string
@returnsstring

back

void
@returnsvoid

forward

void
@returnsvoid

getState

unknown
@returnsunknown

historyGo

void
@paramrelativePositionnumber
@returnsvoid
Jump to details