To help people migrating from AngularJS, a bunch of things have been added to the location services in Angular 8.
PlatformLocation
now offers access to the hostname, port and protocol, and a newgetState()
method allows to get thehistory.state
.- A
MockPlatformLocation
is also available to ease testing.
All this is really useful if you are using ngUpgrade, otherwise you probably won’t need it.