getLocation function
Returns the current Window's location.
This mainly exists so that components can change the location without requiring a mock Window in tests, which can be limiting since the Window is used for much more than changing the location.
Visible for transformer only.
Implementation
@Injectable()
Location getLocation(Window window) => window.location;