• Overview
@angular/common/testing

MockPlatformLocation

Class

Mock implementation of URL state.

  
    class MockPlatformLocation implements PlatformLocation {}
  
  

hostname

string

protocol

string

port

string

pathname

string

hash

string

state

unknown

getBaseHrefFromDOM

string
@returnsstring

onPopState

VoidFunction
@returnsVoidFunction

onHashChange

VoidFunction
@returnsVoidFunction

href

string

url

string

replaceState

void
@paramstateany
@paramtitlestring
@paramnewUrlstring
@returnsvoid

pushState

void
@paramstateany
@paramtitlestring
@paramnewUrlstring
@returnsvoid

forward

void
@returnsvoid

back

void
@returnsvoid

historyGo

void
@paramrelativePositionnumber
@returnsvoid

getState

unknown
@returnsunknown
Jump to details