• Overview
@angular/common

LocationStrategy

Class

Enables the Location service to read route state from the browser's URL. Angular provides two strategies: HashLocationStrategy and PathLocationStrategy.

  
    abstract class LocationStrategy {}
  
  

path

string
@paramincludeHashboolean | undefined
@returnsstring

prepareExternalUrl

string
@paraminternalstring
@returnsstring

getState

unknown
@returnsunknown

pushState

void
@paramstateany
@paramtitlestring
@paramurlstring
@paramqueryParamsstring
@returnsvoid

replaceState

void
@paramstateany
@paramtitlestring
@paramurlstring
@paramqueryParamsstring
@returnsvoid

forward

void
@returnsvoid

back

void
@returnsvoid

historyGo

void
@paramrelativePositionnumber
@returnsvoid

onPopState

void
@returnsvoid

getBaseHref

string
@returnsstring
Jump to details