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